In the previous article I showed how to take the advantage of Javascript for page caching.
This cache strategy allows to generate static HTML and allow the web server to serve it, without waste a useless Rails request/response cycle. But, since the cached page is stateless we ask help to Javascript for make it a little bit dynamic.
Flash
All of you has probably noticed that flash object is an enemy of page caching. Let me show you why.
class SessionController
Now suppose the application is in a blank state, when the user hits the dashboard_url, ActionPack will cache the page, including the flash status. This means it will be always rendered, even if the flash will be expired.