Summary
We have seen how a CMS will contain many objects that represent elements of the system, such as extensions to the core logic. Rather than adopting a piecemeal approach to handling these relatively small but important groups, we can gain efficiency by building specialized handlers. The handlers build data structures out of information from the database, but we can make further gains by storing the information in a cache so that it can be quickly and easily retrieved in many instances. The cache provides a means of saving useful data that can be reused.
Having settled on the use of cache, it was clear that the principle could be applied more widely, especially to saving the XHTML that is generated and sent to the client browser. When the underlying data is slow moving, the XHTML can be constructed once, and then subsequent requests can be served from the cache. After some time, the information is liable to become out of date, so the cache is refreshed.
Although cached handlers and XHTML...