Personal tools
Sections
You are here: Home Products Help Center OpenEngagement DMS 2.5 Advanced Topics Caching Files
Document Actions

3. Caching Files

Up one level
Lists the complications involved with caching web content, using applications such as Apache.

With respect to caching files, Apache has a module which can perform very effective caching, though Squid, another open-source product, is designed specifically for this purpose, and can likely do a somewhat better job. Many Plone sites use both Squid and Apache, though this is overkill unless you have very high web traffic. With caching, it takes some effort to tweak the settings so that performance is near optimum. The idea of caching is, if pages are accessed often, such as perhaps the OpenEngagement DMS home page, or a view on a commonly-accessed Engagement, it is not efficient for the OpenEngagement DMS to generate the page for every access; it is more efficient for Apache or Squid to cache the page, and to simply serve this cached page to users. This can, though, result in displaying out-of-date information, often referred to as stale data. For example, a user, say, Mary, accesses the Local Roles page of Engagement tax2001, then another user, say, Sam, changes the local roles on Engagement tax2001, causing the display of the Sharing page to change. If Mary then navigates to another page in the CW CMS, and then back to that page, and if Apache or Squid simply gives her the cached version of the page, instead of one created at that time by the OpenEngagement DMS, the page will be out of date; it will not show Sam's changes. It is recommend firms only cache .css, images, and java script files in order to eliminate this possibility.

Caching files can also lead to security holes. For example, Apache or Squid may cache the page related to the View tab for a given Document. If a user who does not have permission to view this page requests this page, Apache or Squid will not check the permissions of the user; if the page is cached they will simply return it to the user.

Note as well, while most images may be safely cached, firms likely do not wish to cache all images. Some images may represent, for example, scanned documents or other content whose access should be protected by the OpenEngagement security system.