How to use it with cache sweeper? #14
Comments
Call #touch on whatever you've made that cache depend on. See key-based expiration. |
Okay, I guess my case is a little special:
We implemented a sweeper to make a call to expire_fragment('testimonial') when a testimonial is changed. But as far as I tried, expire_fragment doesn't work (because the cache key 'testimonial/'?) |
Cache digests is not intended to work with manual expiration using a sweeper. Only key-based expiration. On Nov 24, 2012, at 9:24, phuongnd08 notifications@github.com wrote:
|
Are you saying expire_fragment work without cache_digests but won't work with cache_digests? |
Correct. They are not designed to work together. Cache digests are only intended to work together with key-based expiration where you never need to manually expire and know the whole cache key. There's a pull request available for turning off the digest on a per-call basis pending, though. On Nov 25, 2012, at 7:05, phuongnd08 notifications@github.com wrote:
|
If I want to invalidate a cache when a model is created, how would I do it?
The text was updated successfully, but these errors were encountered: