Cache values in instance variables to minimize OS command runs.