Skip to end of metadata
Go to start of metadata

Caching Overview

Theme Builder 2.0 uses various caching methods in order to improve performance by reducing the number of files that are downloaded with each visit to a page.

Conditional GET

Adaptavist developed a "Conditional GET" caching mechanism for Confluence which significantly improves loading times. A file is loaded when it is first requested and then the browser will check with the server on subsequent requests to see if it has changed – if the file has not been changed, it won't be loaded again.

The mechanism became a standard feature of Confluence in version 2.1.5 and above (Confluence 2.2 and above recommended) – if you're using an earlier version of Confluence, files will be downloaded from the server every single time they are requested, regardless of whether they have changed or not, and this will degrade performance.

It should be noted that different browsers behave differently. For example, Internet Explorer doesn't bother checking if the file has changed - it just assumes it hasn't and never downloads it again until it's eventually cleared from the cache. As a result, you may find that after editing the theme some users may need to clear their browser cache for certain changes to take effect.

Most of the files used by Builder (eg. javascript, menu styles, icons) currently use this form of caching but in subsequent versions we hope to make more of them use Cache Expire...

Cache Expire

Unlike Conditional GET, this form of caching explicitly tells the browser "don't bother checking for new versions of this file for a period of time".

Because your browser isn't connecting to the server to check for new versions of a file, which in itself takes time, there is less load on the server and the latency of checking for updates is removed.

To ensure that the file is reloaded when changes are made (eg. altering theme config) we include a timestamp in the URL.

We're hoping to extend the use of Cache Expire in future versions of Builder, especially for things such as JavaScript and icons.

  • No labels