Home | 2.1.5 Full Web page versus fragment caching | 2.2 Introduction to DynaCache


2.1.6 Cache considerations

The DynaCache caching policy that you have or will set up for your application is critical in contributing to reduced response time and providing better end user experience. It is critically important that you carefully specify the policies so that the correct content is served out of the cache. For example, use language as part of the cache key, so that an English fragment is not served out of the cache for a French page. Not all Web site content should be cached.

You need to consider the cost of regenerating a response within a given time frame. Calculate the number of CPU cycles that are needed and the critical resources that are accessed (such as the number of database queries that are executed), and then weigh that against the reusability of the response within the window of time that a cached response would be valid. Heavy calculations that stay valid for long periods are ideal cache candidates. Heavy calculations that live for shorter periods are less beneficial as a cacheable item.

You may want to save Database Server CPU cycles at the expense of executing more Application Server cycles since it is easier to add another Application Server to a cluster than add another database server.

The reusability of the object should also be considered in terms of whether the object is specific to a user, session, store, or if it is a site-wide or publicly reusable object that is reusable across requests.

+

Search Tips   |   Advanced Search