Home | 2.6.2 Cache entry element overview <cache-entry> | 2.6.4 Cache IDs and the cache hit


2.6.3 Cache ID Overview

As the DynaCache service places objects in the cache, it labels them with unique identifying strings (cache IDs) constructed according to rules that you specify inside your cache entry <cache-id> elements and sub-elements. For example...

/webapp/wcs/stores/ConsumerDirectATP/include/styles/style1/CachedFooterDisplay.jsp:storeId=511:DC_userType=G:DC_lang=-1:UTF-8:requestType=GET

For now, ignore the Commerce-specific, DC_x type parameters, they are covered later. Think how DynaCache built this ID.

You can probably deduce what happened: the ID generation logic appends the full JSP path, selected JSP parameters and their values, and finally the HTTP request type GET into a single text string. You also probably noticed that the appended string items are separated from one another by a colon. Together, these aggregated strings form the JSP's unique cache lookup key.

How does the ID generator know how to do this, meaning which parts to include when building cache IDs? It is the cachespec.xml file definitions that tell DynaCache what parts or "components" are to be used in the assembly process when forming various ID strings.

Here is the CachedFooterDisplay.jsp output content as stored in the DynaCache1.

How a cachespec entry is constructed from filtering a URL.

Figure 2-12 Defining cachespec entries (JSP example)

1Note: the image is not displayed because it is stored as a separate fragment.

+

Search Tips   |   Advanced Search