Use PetState#updated_at for the supported pose cache key, not latest ID

This is because labeling poses with the Support tools *should*
invalidate the `PetState.all_supported_poses` cache! But the previous
cache key would only invalidate when a new pet state is *added*, not
when one is *edited*.
This commit is contained in:
Emi Matchu 2024-10-07 17:56:42 -07:00
parent fe67211fdf
commit 13a0362e6d

View file

@ -211,7 +211,7 @@ class PetState < ApplicationRecord
end
def self.last_updated_key
PetState.maximum(:id)
PetState.maximum(:updated_at)
end
def self.all_supported_poses