Interface for object cache
Namespace: Scanjour.Workflow4.Base.Cache
Assembly: Scanjour.Workflow4.Base (in Scanjour.Workflow4.Base.dll) Version: 23.2.0.0 (23.2.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
Name | Description | |
---|---|---|
HashAlgorithm |
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.) | |
HighWaterMark |
Max bytes allocated for objects in the cache.
(Inherited from IObjectCacheBase.) | |
Item |
The key of the item to get
| |
LowWaterMark |
When cache grows to HighWaterMark objects will be removed from the cache until the total size is less than LowWaterMark.
(Inherited from IObjectCacheBase.) | |
NrOfItems |
The number of items currently in the cache
(Inherited from IObjectCacheBase.) | |
TotalSize |
Total size of all stored objects in cache
(Inherited from IObjectCacheBase.) | |
TypeName |
The name of the type that is cached
(Inherited from IObjectCacheBase.) |
Methods
Name | Description | |
---|---|---|
Clear |
Method that will empty the cache and free up all memory allocated.
(Inherited from IObjectCacheBase.) | |
Clear(Uri, TKey) |
Remove object from the hash including statistics
| |
GetHash |
Returns the hash value of the object with specified key
| |
GetOrInsert |
Gets and returns the object if it exists in the cache otherwise the supplied createMethod is used to
get the item from the repository
| |
GetOrInsertChangedSince |
Gets and returns the object if it exists in the cache - and is newer than the date provied in changedSince argument - otherwise the supplied createMethod is used to
get the item from the repository
| |
GetOrInsertWithHash |
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
| |
GetStatistics |
Returns statistic information for a item in the cache
| |
Refresh |
Removes all items from cache that is newer in the repository
|
See Also