9 responses to “high performance rails caching with redis and nginx”

  1. Joey

    Could this technique work with user authentication using Devise?

  2. Andrés Rojas

    keep in mind that using the ‘keys’ command on a large redis database will slow you down considerably. we had a situation where running keys was timing out commands that came after it, and all hell broke loose. so beware.

    one alternative is to keep a reference to your cached views’ urls in a redis set, so when you go to invalidate, instead of hitting all the keys in your database to find what you need to delete, you simply get the members of the set and delete those.

  3. rails caching with redis – invalidation done right | over9000 blog

    [...] my last article about using redis as rails cache i used the redis ‘keys’ function to invalidate cache. [...]

  4. periodic cache regeneration with rails redis and a spider | over9000 blog

    [...] you have set up your nginx as described here [...]

  5. Mooktakim Ahmed

    This is pretty cool, but this is what a reverse proxy meant for.

    Set proper HTTP caching headers and use a fast reverse proxy (such as Varnish).

    You will get the benefit of Redis, as in everything kept in memory and access fast, but at the same time you still benefit from client side caching.

Leave a Reply