You are here: Administrators Reference > Server and Customer Administration > Stale Cache Handling


Stale Cache Handling

CommonSpot gives you options for handling stale cache – page content that expires because of related content updates (for example, changes affecting page indexes) or cached dynamic content that exceeds a defined limit. Use this feature to find a balance between the performance benefits of temporarily serving expired content and the content freshness requirements of your site(s).

Enabling cache for dynamic content improves performance by eliminating the need for CommonSpot to re-render certain types of dynamic content for every page request.

With Stale Cache Handling set to Never, CommonSpot always delivers the most current content, even if this means performing time-consuming rendering while site visitors wait. Enabling expired cache improves performance, although site visitors may not immediately see the latest updates.

Authors and administrators can define how outdated is “too outdated” for the current page, template, or site. Use site-level settings to set default usage; optionally override defaults at the template or page level. Page level overrides template level, and template level overrides site level.

For example, caching random content for 5 minutes gives most requests the performance benefit of locally stored content, without losing dynamic appearance. This short limit ensures that all updates are delivered quickly, but may negate performance benefits for infrequently viewed pages. A longer limit (one day, for example) can eliminate most “while you wait” page rendering (especially if a scheduled process rebuilds cache during low-traffic periods), but some content updates won't be immediately available to visitors.

With stale cache enabled, CommonSpot inserts a background process into the ColdFusion Administrator to detect and regenerate recently requested expired content on target servers, updating oldest stale cache first. You can view processing status for this background process through the Server Tools utility View Stale Cache Queue.

Sites can gain significant performance advantages by adjusting these settings, particularly for content that changes frequently.

To minimize the delivery of outdated content, configure the Rebuild Stale Cache job to automatically rebuild stale cache on a scheduled basis. Schedule this task to run frequently (for example, every two to five minutes) to maximize content freshness and minimize processing time.

Important Note: Unless you schedule this job, CommonSpot does not automatically rebuild stale cache. To ensure content updates, schedule the Rebuild Stale Cache job through Server Administration - Utilities - Scheduled Jobs.

Also note that both stale cache processing and all scheduled jobs must be separately set up and managed for replication read-only production servers.

Handling updates this way both optimizes page performance and more efficiently processes content changes.

At the site level, set default stale cache handling by expanding Properties in the Site Administration left panel and choosing Cache Properties.

You can customize stale cache handling at the page or template level, by choosing Cache/Static Settings from the Properties menu in author mode. Settings at the template level override site level settings, and page-level settings override template settings.

You also need to consider the Performance Options defined for your site when deciding on Stale Cache settings and how frequently to rebuild stale cache.

Sites running Static Content Generation have additional options for handling stale cache, as described under Cache/Static Settings for Static Sites.

Shared Database customers who optionally purchase and install a CommonSpot Cache Server also have more options for handling stale cache. This separately licensed server is dedicated to continuously rebuilding cache for faster content delivery, performing the following functions:

a. When stale cache is enabled, automatically detects and rebuilds cache for any stale content served.

b. Continuously rebuilds cache for all pages, ensuring that the cache is always as up-to-date as possible.

Any updates to the cache become automatically available to all servers in a cluster, ensuring the most up-to-date content, and improving overall site performance. See the Shared Database Configuration Guide for more information.


Related Links

You can download PDF versions of the Content Contributor's, Administrator's, and Elements Reference documents from the support section of (requires login).

For technical support: