Cache variables for performance