CacheManager Object [C++]

Use this object to establish and use a collection of data caches. Each data cache is either a Dictionary object or an LRUCache object. You can specify which one you would like to use by setting the CacheObjectProgID property.

When CacheManager is first instantiated in a Web application (normally when the first request to the application is received), it starts a background thread that is responsible for the automatic refreshing of caches. The security context of this thread is inherited from the ASP or ASP.NET worker thread at the time it is first created.

Ee824992.caution(en-US,CS.20).gifCaution

  • Use caution if you are deploying CacheManager in a site that is configured to impersonate users. You must ensure that the security context of the creating thread is a well-defined context, such as the anonymous IIS process account.

For additional information about CacheManager, see “Refreshing Commerce Server Caches” at https://go.microsoft.com/fwlink/?LinkId=15097.

ProgID:   Commerce.CacheManager (Externally creatable)
COM Class Name:   CacheManager
Type Library Name:   Microsoft Commerce 2002 Cache Manager Type Library
DLL Name:   mscscache.dll
Threading Model:   Both

[C++]

COM Interface Name:   ICacheManager
Interface ID Constant:   IID_ICacheManager
Header File:   None

[C++]

In C++, use the ICacheManager interface to access the properties and methods of the CacheManager object.

Methods

[C++]

Method Description
GetCache Retrieves the data cache Dictionary object associated with a specified data cache name.
RefreshCache Forces an immediate, synchronous refresh of the cache.

[Visual Basic]

Method Description
GetCache Retrieves the data cache Dictionary object associated with a specified data cache name.
RefreshCache Forces an immediate, synchronous refresh of the cache.

Properties

[C++]

Property Type Description
AppUrl BSTR Stores the full URL of the application.

This property is read/write.

CacheObjectProgId BSTR Stores the ProgID for the object that is to be used for cache functions internally within the CacheManager object. Determines the type of object returned by the GetCache method.

This property is read/write.

LoaderConfig IDispatch Stores the configuration Dictionary object that should be passed to the Loader component.

This property is read/write.

LoaderProgId BSTR Stores the ProgID of the component used to create and populate a data cache.

This property is read/write.

RefreshInterval long Stores the number of seconds between automatic cache refresh operations.

This property is read/write.

RetryInterval long Stores the number of seconds to wait before retrying after a cache load has failed.

This property is read/write.

WriterConfig IDispatch Stores the configuration Dictionary object that should be passed to the Writer component.

This property is read/write.

WriterProgId BSTR Stores the ProgID of the component used to write out some type of data that has been accumulated since the last refresh. Advertising event data is one example of the type of data that might be accumulated.

This property is read/write.

[Visual Basic]

Property Type Description
AppUrl String Stores the full URL of the application.

This property is read/write.

CacheObjectProgId String Stores the ProgID for the object that is to be used for cache functions internally within the CacheManager object. Determines the type of object returned by the GetCache method.

This property is read/write.

LoaderConfig IDispatch Stores the configuration Dictionary object that should be passed to the Loader component.

This property is read/write.

LoaderProgId String Stores the ProgID of the component used to create and populate a data cache.

This property is read/write.

RefreshInterval long Stores the number of seconds between automatic cache refresh operations.

This property is read/write.

RetryInterval long Stores the number of seconds to wait before retrying after a cache load has failed.

This property is read/write.

WriterConfig IDispatch Stores the configuration Dictionary object that should be passed to the Writer component.

This property is read/write.

WriterProgId String Stores the ProgID of the component used to write out some type of data that has been accumulated since the last refresh. Advertising event data is one example of the type of data that might be accumulated.

This property is read/write.

See Also

Core Object Programming Concepts

Code to Implement Custom Cache Components

Copyright © 2005 Microsoft Corporation.
All rights reserved.