Share via


Commerce Server 2002 Caching Techniques

Commerce Server 2002 provides the CacheManager object, which is well suited for ASP-based applications and Commerce Server pipelines.

For an ASP.NET-based application using Commerce Server 2002, it is more efficient to use ASP.NET caching techniques whenever possible since this provides all the advantages of the .NET framework features (for example, managed code and integrated functionality with ASP.NET).

Several Commerce Server pipelines, such as the basket, checkout, and Content Selection Framework pipelines, are inherently dependent on the CacheManager object for caching their native data. Therefore, the International Retail Site contains some caches that use the CacheManager object. All of the caches are configured and initialized using the <caches> configuration information in the web.config file.

The following is a list of data caches that use the CacheManager object:

  • AdvertisingDiscounts
  • SampleRegionalTaxCache
  • ShippingManagerCache
  • QueryCatalogInfoCache

Additionally, Commerce Server 2002 provides some degree of internal data caching using the Base Class Library (BCL). Some frequently used items of data that are exposed through properties are cached. This can lead to the Commerce Server Business Desk user needing to "publish" to the Web site to clear a cache. A Refresh method is provided in all BCL objects that employ caching. This method is called when a Business Desk refresh message is received by the International Retail Site.

Caches Tag

The Caches tag is a container element for cache tags that are used to configure CacheManager-based caches in the application. The cache configuration supports a number of default configurations for advertising, discounts, and other types of caches common to Commerce Server. In each case, the cache type has its own default options associated with it; however, the default options can all be overridden. The following code example shows how to use the caches tag:

<caches>
      <cache name="name"
             type="Advertising|Discounts|Tax|Shipping|Custom"
             loaderProgId="progid"
             writerProgId="progid"
             cacheObjectProgId=”progid”
             refreshInterval="0"
             retryInterval="60"
             maxSize=”10”>
             <config key="key" value="value" />
      </cache>
</caches>

Copyright © 2005 Microsoft Corporation.
All rights reserved.