Rails Russian Doll Caching For Multi-Language Sites
I’ve been digging in on Rails russian doll caching lately, working on various performance improvements of a high-traffic site that is pushing the limits of our server.
One thing worth noting is that if your site is multi-lingual is that you’re going to need to modify the default cache call to account for locale in the cache key, for example:
instead of:
- cache blog_post do
You’ll want to include the locale:
- cache [I18n.locale, blog_post] do
I am available for Ruby on Rails consulting work – get in touch to learn more.