Fragment Caching takes into account localization out of the box

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fragment Caching takes into account localization out of the box

Santiago Bartesaghi
Hi everyone,

I'd like to propose an improvement to Rails' fragment caching mechanism. The same way Rails uses a template md5 in the cache key, I propose to automatically add the I18n.locale value to the cache key since it doesn't make sense to ever retrieve a cached entry in another language than the current request.

Let me know if you are interested on it and I can work on the PR :)

Thanks

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-core/8bf49e6a-98b3-4bc2-9596-95f47169890e%40googlegroups.com.