Search code examples
ruby-on-railsrubycachingcache-control

Ruby gem for working memcached-tag and/or gem providing this functionality using redis/memcached


In my rails app, I want to make some cache dependent on tags: for example, main page depends on products, page for user X for product Y depends both on user X and user Y tags, category page depends both on every product and category itself.

I haven`t found any ruby version for this functionality, though there is fork of memcache, which implements it and drivers for php frameworks(one I know about - in kohana framework https://github.com/kohana/cache/blob/3.2/master/classes/kohana/cache/memcachetag.php ). Or, implementation of such behavior using redis/database for data storage.

So, is there any gem, prodiving this functionality, or workarounds to cache objects, depending on several different tags?


Solution

  • This kind of gem exists - cashier.