Is it possible to intercept Action Cache to force it to use a
specified filename to save to.... or to load a specified cached file
that is different to the current one expected for the URL?
I guess this is some sort of "extending" of action cache.... but I
cannot find much in google
Interesting idea, but I'd ask the question, why would you want to do this? Is there a real-world performance bottleneck your trying to fix that wouldn't be addressed with the standard page, action or fragment caching ?
I guess this could also be done by implementing some sort of Fragment
Cache... wrapping a whole page
Just not sure where to begin... I don't want to reinvent rails
caching... just want to tweak it with a simple conditional + have
control on the file cache storage
<% cache(:action => "list", :controller => "blah", :style => "new") do %>
# code that renders in either mode conditionally
<% end %>
You could also look at using something like cells, which has caching built in and might be flexible enough to cache and render 2 different views under the same action (depending on the circumstances).
I guess this could also be done by implementing some sort of Fragment
Cache... wrapping a whole page
Just not sure where to begin... I don't want to reinvent rails
caching... just want to tweak it with a simple conditional + have
control on the file cache storage
+1 to fragment caching, as it is an easy-peasy solution to implement
The documentation says: "Pressing shift-reload in the browser will cue
the browser and Varnish to regenerate the page, regardless of the
cache state." HTTP Caching | Heroku Dev Center
That goes against expectation... hope it's an error