Various cache fixes