ahawkins / cashier

Tag based caching for Rails using Redis. Associate different cached content with a tag, then expire by tag instead of key.
MIT License
162 stars 39 forks source link

Flatten tags to make sure a normal cache call will work. #9

Closed mark-ellul closed 11 years ago

mark-ellul commented 12 years ago

I found that when I tried to cache using the below example, it was not flattening the tags, hence the final cache key used to link the tag with the fragment was "parent/aunty" instead of having 2 separate cache entries. So then the gem never expired the fragment properly.

ahawkins commented 12 years ago

Nice. Can you add a test?

mark-ellul commented 11 years ago

thanks, sorry about not adding the test, last few months has been crazy