IObjectCacheTKey, TValue Interface

Scanjour Workflow4 Reference Manual
Interface for object cache

Namespace:  Scanjour.Workflow4.Base.Cache
Assembly:  Scanjour.Workflow4.Base (in Scanjour.Workflow4.Base.dll) Version: 21.3.0.0 (21.3.0.0)
Syntax

public interface IObjectCache<TKey, TValue> : IObjectCacheBase
where TValue : ICachableObject

Type Parameters

TKey
Type of the key used for the storing the objects in the cache
TValue
Type of the objects that are cached

The IObjectCacheTKey, TValue type exposes the following members.

Properties

  NameDescription
Public propertyHashAlgorithm
Get or set the hashalgoritm for the cache. The default value is MD5. To turn off hashing set the value to HashAlgorithmEnum.None
(Inherited from IObjectCacheBase.)
Public propertyHighWaterMark
Max bytes allocated for objects in the cache.
(Inherited from IObjectCacheBase.)
Public propertyItem
The key of the item to get
Public propertyLowWaterMark
When cache grows to HighWaterMark objects will be removed from the cache until the total size is less than LowWaterMark.
(Inherited from IObjectCacheBase.)
Public propertyNrOfItems
The number of items currently in the cache
(Inherited from IObjectCacheBase.)
Public propertyTotalSize
Total size of all stored objects in cache
(Inherited from IObjectCacheBase.)
Public propertyTypeName
The name of the type that is cached
(Inherited from IObjectCacheBase.)
Top
Methods

  NameDescription
Public methodClear
Method that will empty the cache and free up all memory allocated.
(Inherited from IObjectCacheBase.)
Public methodClear(TKey)
Remove object from the hash including statistics
Public methodGetHash
Returns the hash value of the object with specified key
Public methodGetOrInsert
Gets and returns the object if it exists in the cache otherwise the supplied createMethod is used to get the item from the repository
Public methodGetOrInsertWithHash
Gets and returns the hashvalue and object if it exists in the cache otherwise the supplied createMethod is used to get the item from the repository
Public methodGetStatistics
Returns statistic information for a item in the cache
Public methodRefresh
Removes all items from cache that is newer in the repository
Top
See Also

Reference