Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache not updating #431

Open
maxrosecollins opened this issue Jun 27, 2019 · 1 comment
Open

Cache not updating #431

maxrosecollins opened this issue Jun 27, 2019 · 1 comment

Comments

@maxrosecollins
Copy link

maxrosecollins commented Jun 27, 2019

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

@dainmiller
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants