←Select platform

DefaultCacheCapabilities Enumeration

Summary

Set of features that a cache implementation provides.

Syntax
C#
VB
C++
Java
[FlagsAttribute()] 
public enum DefaultCacheCapabilities 
<FlagsAttribute()>  
Public Enum DefaultCacheCapabilities 
public [FlagsAttribute] 
   enum class DefaultCacheCapabilities sealed 
public enum DefaultCacheCapabilities 

Members

0x00000000 None A cache implementation does not provide any of the features that are described in DefaultCacheCapabilities
0x00000001 InMemoryProvider

Cache implementation runs at least partially in memory

0x00000002 OutOfProcessProvider

Cache implementation runs out-of-process

0x00000004 CacheEntryChangeMonitors

Cache implementation supports the ability to create change monitors that monitor entries

0x00000008 AbsoluteExpirations

Cache implementation supports the ability to automatically remove cache entries at a specific date and time

0x00000010 SlidingExpirations

Cache implementation supports the ability to automatically remove cache entries that have not been accessed in a specified time span

0x00000020 CacheEntryUpdateCallback

Cache implementation can raise a notification that an entry is about to be removed from the cache

0x00000040 CacheEntryRemovedCallback

Cache implementation can raise a notification that an entry has been removed from the cache

0x00000080 CacheRegions

Cache implementation supports the ability to partition its storage into cache regions.

When CacheRegion is not supported, then the cache consumer should never call DeleteRegion. Instead, DeleteAll should be used when a group of items are to be deleted all at once.

Cache consumers such as the Documents toolkit will always call add or get items with a key and a region name. If your custom cache does not support regions (or grouping), then use the regionName + keyName as the unique identifier for the cache item. ExternalResources is supported by FileCache since it has direct access to the cache items stored in disk and can delete the whole directory (region) when DeleteRegion is called in one shot.

0x00000100 ExternalResources

Cache implementation supports obtaining a URI to cache items providing direct file read or write access.

If the cache supports external resources then consumers may call BeginAddExternalResource to obtain file read or write access to the cache item through a URI to enhance performance when adding an item with large amount of binary data such as image files and EndAddExternalResource<T> to commit or discard the changes. Similarly, GetItemExternalResource and RemoveItemExternalResource may be called by the consumer to get such access on existing items or when they are removed from the cache. ExternalResources is supported by FileCache since it has direct access to the cache items stored in disk.

0x00000200 Serialization

Cache implementation supports serialization

This is a hint to the cache users that this implementation will serialize the objects added to the cache right away. This means that the original object is not shared and cannot be modified by the cache after adding it since a copy is generated through the platform serialization.

If the cache does not support or may perform serialization at a later time (when local memory is exhausted for instance), the cache user should always store a clone of the object into the cache.

0x00000400 VirtualDirectory

Cache implementation supports obtaining a URI to cache items providing HTTP GET access.

If the cache supports obtaining GET access to cache items then consumers may call GetItemVirtualDirectoryUrl to obtain the URL to the cache item to speed up access to the item data from a web service. ExternalResources is supported by FileCache.

Remarks

Refer to Document Toolkit and Caching for more information on how the cache is used with the LEADTOOLS Document library and how to set up optional custom cache provider.

Requirements

Target Platforms
See Also

Reference

Leadtools.Caching Namespace

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Caching Assembly