Skip to main content
ATL Server Library Reference 
Caching Reference 

ATL Server provides a range of classes and interfaces in atlcache.h for caching arbitrary data, files, stencils, and DLLs.

Interfaces

IDataSourceCache Interface

This interface provides methods for adding database connections to and retrieving them from a cache of open connections.

IDllCache Interface

This interface provides methods for adding DLLs to and retrieving DLLs from a cache.

IFileCache Interface

This interface provides methods for adding and retrieving files from a cache.

IMemoryCache Interface

This interface provides methods for adding, retrieving, and removing items cached in memory.

IMemoryCacheClient Interface

This interface provides a method that can be called to free an item that is being removed from a cache.

IMemoryCacheControl Interface

This interface provides methods for controlling the size of a cache.

IStencilCache Interface

This interface provides methods for adding stencils to and retrieving stencils from a cache.

IStencilCacheControl Interface

This interface provides methods for controlling a stencil cache.

Classes

CBlobCache Class

This class provides functionality for caching arbitrarily sized data blocks in memory.

CCacheDataBase Class

This is an empty class that is used as the default cache entry type by CMemoryCacheBase.

CDataSourceCache Class

This class caches open data connections and implements the IDataSourceCache interface.

CDllCache Class

This class implements a DLL cache.

CDllCachePeer Class

This class conforms to the DLL cache peer archetype and is used to cache pointers to ATL Server request handler functions.

CFileCache Class

This class implements a file cache.

CMemoryCache Class

This class represents a generic memory cache.

CMemoryCacheBase Class

This class provides features for caching generic items in memory.

CNoDllCachePeer Class

This class conforms to the DLL cache peer archetype and can be used when no extra data needs to be stored with the DLLs in the cache.

CNoFileCachePeer Class

This class conforms to the file cache peer archetype and can be used with CFileCache when no auxiliary information needs to be stored with the entries.

CStencilCache Class

This class implements a stencil cache, and is used by ATL Server to cache preprocessed stencils to speed response processing.

Structures

DLL_CACHE_ENTRY Structure

This structure describes a cached DLL.

CCacheDataEx Structure

This structure is used by CMemoryCache and CStencilCache to store auxiliary data for each item in the cache.

CCacheDataPeer Structure

This class is used by CFileCache to provide an interface through which auxiliary data can be attached to each cached file.

Typedefs

HCACHEITEM

A handle to an item stored in a CMemoryCacheBase-derived class.

Functions

GetDataSource

Call this function to retrieve a cached data source or add it to the cache if not already present.

RemoveDataSource

Call this function to close a cached connection and remove it from the data source cache.

Macros

ATL_BLOB_CACHE_TIMEOUT

This macro defines the cache maintenance frequency for the CBlobCache implementation.

ATL_CACHE_KEY_LENGTH

This macro defines the maximum length of a string used as a cache key.

ATL_DLL_CACHE_TIMEOUT

This macro defines the default value in milliseconds used as the timeout for the DLL cache. The timeout value determines the frequency with which the DLL cache is swept for stale entries.

ATL_DS_CONN_STRING_LEN

This macro defines the maximum length of data source connection names.

ATL_FILE_CACHE_TIMEOUT

This macro defines the cache maintenance frequency for the CFileCache implementation.

ATL_STENCIL_CACHE_TIMEOUT

This macro defines the default value in milliseconds used as the timeout for the stencil cache. The timeout value determines the frequency with which the stencil cache is swept for stale entries.

ATL_STENCIL_CHECK_TIMEOUT

This macro defines the frequency with which ATL Server checks cached stencils against the raw stencil file to determine if the cached version is out of date.

ATL_STENCIL_LIFESPAN

This macro defines a default filetime value used as the life span for stencils in the stencil cache. Stencils are removed from the cache when their life span has been reached whether or not they have been used recently.

See Also