Caching of the actual page content
1 Cache on server
Parsed pages are cache on the database. If it is "fresh", then no parsing is needed and the cached page is returned.
- Public page: Original url-request contains the content of the page and is cachable. After this page has arrived to the client, a non-cacheble ajax-request is made to get details that can't be cached, such as whether you are logged in as administrator or not.
- Private page: Original url-request is non-cacheable and contains only info about whether you are logged in or not. If you are logged in, a (private-cacheable (only stored in your computer/browser) ) AJAX request is sent to fetch the content of the page.
All cached requests of pages are validated
(The request looks like normal, only containing the header-field if-modified-since
and the server may answer with a short 304 (Not Modified))
3 Returning to a page during a session
This way hitting the backbutton will give very rapid respons on pages that you have not
changed, but still get up to date (but a bit slower) responses to pages that you have
This behavior will however give you a stale
page if other people have changed the page.
Caching of static files (js, css, image-files for the interface etc.)
Static files have their sha1-hash calculated and added to their url in the index-file which means that no request needs to be done unless they have changed.
-header fields and 304 (Not Modified) are used.