Поделиться через


LRUCache Object

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Note

The LRUCache object is obsolete; instead, use ASP.NET and/or Catalog API caching.

Use this object to support the creation, storage, and retrieval of name/value pairs, referred to as elements, from a cache in memory. The LRUCache object functions similarly to the Dictionary object, except that it only stores a limited number of elements, and internally ranks them according to use. When the cache is full and a new element needs to be added, the least recently used element is removed from the cache to make room for the new element.

ProgID:

Commerce.LRUCache (Externally creatable)

COM Class Name:

LRUCache

Type Library Name:

Microsoft Commerce Server Cache Manager Type Library

DLL Name:

mscscache.dll

Threading Model:

Both

COM Interface Name:

ILRUCache

Interface ID Constant:

IID_ILRUCache

Header File:

cacheint.h

[C++]

In C++, use the ILRUCache interface to access the methods of the LRUCache object.

Because this object is primarily intended for use within ASP script, access from C++ will not be common.

Methods

Method

Description

Flush

Removes an element from the cache.

FlushAll

Removes all elements from the cache.

Insert

Inserts an element into the cache.

Lookup

Returns the value of an element in the cache when given the name of the element.

LookupObject

Returns an object in the cache when given the name of the object.

SetSize

Sets the maximum size of the cache.

See Also

Other Resources

COM Object Reference