Patch #7204
openCaching of public pages, requested from anonymous users (10x - 20x speed improvements)
0%
Description
I need a quicker access for public pages, requested from anonymous users.
I can not use a caching reverse proxy because the web proxy does not know when a page is requested from a registered user, or when the page is requested from an anonymous user.
In this patch the Ruby/Redmine application controller returns a page from the cache with ~ 10x - 20x speedup respecting normal pages. The caching is applied only if the user is anonymous (not logged) and only if the page does not contains forms with an authenticity token.
The cached page is different according the locale of user, so different pages for different locales are returned correctly.
The Redmine administrator can configure the cache refresh rate using the main Settings form.
The caching is performed using the caching method specified in the config/additional_environment.rb file. I added something like
config.action_controller.perform_caching = true config.action_controller.cache_store = :file_store, File.join(File.dirname(__FILE__), '../tmp/cache')
I tested the patch on version 1.0.5, but it is not yet on a server in production.
The patch can be applied to r4595 or Git commit:6659c630b264325
Warnings / sorry in advance :-)- this is my first ruby code
- this is my first ruby on rails code
- I'm not a native english speaker, and probably my labels/texts is not completely correct
Many thanks for the good product that is Redmine!
Files