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 (1 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.
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.
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.
Note: Unless you schedule this job, CommonSpot does not automatically rebuild stale cache. Schedule the Rebuild Stale Cache job through Server Administration - Utilities - Scheduled Jobs.
Handling updates this way both optimizes page performance and more efficiently processes content changes.
Sites running Static Content Generation have additional options for handling stale cache, as described under Cache/Static Settings for Static Sites.
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.
By default, dynamic pages are represented on the static server by files containing JavaScript code to redirect requests to the dynamic server. You can customize this representation by updating redirect-custom.cfm in the site’s root directory on the Authoring server. The file {commonspot-root}/static/redirect-custom.cfm is a sample redirect module containing all of the attributes and available parameters required to override the default redirect mechanism.
Sites with the Cache Server installed have additional options: Shared Database customers can optionally purchase and install a CommonSpot Cache Server, a separately licensed server dedicated to continuously rebuilding cache for faster content delivery. This dedicated server performs the following two 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.
Related Links
You can download PDF versions of the Content Contributor's, Administrator's, and Elements Reference documents from the support section of paperthin.com (requires login).
For technical support: