Home


3.2.1 The invalidation process

To work out when a cached page is no longer valid, know what might make the cached page out of date. For example, a cached shopping cart page is invalidated when a customer adds a new item to the cart. Cached items may also be invalidated when an administrator updates the store with the WebSphere Commerce Accelerator or when new catalog data is added using other WebSphere Commerce tooling.

After you have listed the events or actions that make a cached page or fragment invalid, you can use those events to track down which components are responsible for building those pages. In cases where commands are invoked you should define invalidation rules in the cachespec.xml to invalidate dependent cache entries. In short, the steps are:

1. Identify the events that cause a page to become invalid.

2. Track down the components responsible for building those pages.

3. Build invalidation rules based on the components you have identified.

You can also define invalidation rules based on request parameters.

In some cases, it is not events or actions, but rather an elapsed amount of time that invalidates a cache item. For these cases you define invalidation rules based on the elapsed time since a cache entry was last used, or since a cache entry was created. You can also configure the WebSphere Commerce scheduler to invalidate cache entries at a scheduled time interval.

It is essential to have a solid understanding of the business logic and business requirements of your application to know when and how to invalidate cache items.

+

Search Tips   |   Advanced Search