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 is not invalidated when an entry changes #1

Closed
badnack opened this issue Dec 12, 2014 · 1 comment
Closed

Cache is not invalidated when an entry changes #1

badnack opened this issue Dec 12, 2014 · 1 comment

Comments

@badnack
Copy link

badnack commented Dec 12, 2014

Is there a way to force the cache invalidation? Every time I modify an entry in a table, this is not showed.

@jdurand
Copy link
Owner

jdurand commented Dec 24, 2014

@badnack, I haven't maintained or even used this gem in production. It was a naive approach to a non-problem.

If you're thinking about caching your resource pagination queries, I'm guessing you're starting a new project with performance in mind. That's the thinking I had when writing this gem.
It ended up getting in my way most of the time and I didn't gain more than 3ms improvement for the trouble. In this use case most of the time is lost in template rendering, so I'd suggest caching at the view layer instead.

Event worst, with this gem you lose ARs lazy loading mechanism; by caching at the template level, the DB queries won't fire unless the data is needed, so in a case of cache hit, your DB isn't hit anyway.

And yes, the cache sweeper doesn't seem to do its job for some reason...

I don't recommend using this gem, but if you do find a valid use case, I'll be happy to take pull requests.

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