public interface IObjectCache<TKey, TValue> : IObjectCacheBase
where TValue : ICachableObject
Public Interface IObjectCache(Of TKey, TValue As ICachableObject)
Inherits IObjectCacheBase
generic<typename TKey, typename TValue>
where TValue : ICachableObject
public interface class IObjectCache : IObjectCacheBase
type IObjectCache<'TKey, 'TValue when 'TValue : ICachableObject> =
interface
interface IObjectCacheBase
end
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) |
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 |
GetOrInsertAll | Gets and returns all objects if any 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 |