fast_jsonapi icon indicating copy to clipboard operation
fast_jsonapi copied to clipboard

Cache not updating

Open maxrosecollins opened this issue 6 years ago • 1 comments

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

maxrosecollins avatar Jun 27 '19 17:06 maxrosecollins

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?

dainmiller avatar Jun 28 '19 04:06 dainmiller