Using the Fridge as a Cache

The Fridge can play an important role in production environments as a cache. The Cook is configured to use the Fridge and the Fridge is configured to run in online mode. As the Fridge's cache fills up with data, the Fridge is able to respond to more and more requests by simply returning files from its cache, thereby minimizing the load on the Content Engine. In the most extreme case, all of a web site's content can be duplicated in the Fridge's cache so that no requests ever reach the Content Engine.

For such a solution to work, the content of the Fridge's cache must be kept up to date. The traditional mechanism for doing this is expiration: each piece of content in the cache is marked as expired after some arbitrary length of time. When content is retrieved from the cache, it is checked to see if it has expired: if it has expired, then it is discarded and a new copy is retrieved from the back end. This mechanism is obviously not very efficient for content that changes infrequently, since it means that content will often be refreshed even though it has not changed.

For this reason, the Fridge does not use an expiration mechanism. Instead, an Escenic component called the Change Log Daemon is used to monitor and keep a record of all changes made to the content in the Content Engine. Every time a change is made to any content, that change is pushed to the Fridge, ensuring that the Fridge's contents are always fresh.

A script supplied with the Fridge can be used to start up a Change Log Daemon instance that watches the Content Engine for changes and keeps the Fridge contents fresh.

Using the Fridge in this way offers several advantages in production environments:

  • It improves the scalability of the system by completely decoupling the presentation layer from the Content Engine and the editorial system. Increases in audience can be met by simply duplicating CUE Front components, without any need to scale the Content Engine or its database.

  • It improves the reliability of the system: the Content Engine can be taken off line without affecting the presentation layer in any way.

  • It can enable improved performance by allowing the Fridge's cache to be stored in a content delivery network, for example.

For information on how keep the Fridge's content fresh using a Change Log Daemon, see Change Log Daemon Setup.