fast_jsonapi
fast_jsonapi copied to clipboard
Cache not updating
I have caching enabled
cache_options enabled: true, cache_length: 1.hour
and on the model I have the method
def cache_key
"#{model_name.cache_key}/#{id}-#{updated_at.to_i}"
end
but my object doesn't update/clear the cache after an hour.
Is it stored in Redis? When I clear the redis cache it doesn't update either.
I have the option config.cache_store = :redis_cache_store set in config production
What if you change the cache_key to remove the model_name.cache_key/ and just leave the latter half of the key? Does that still result in same behavior?
Also, is this a model that has a lot of relationships to other models, or fairly stand-alone?