• CacheManager



Namespace: Shared.Classes

Assembly: SharedLib

Cache Manager



Name Cache Manager Name
AllowClearAll If false, cache will not be cleared when ClearAllCaches is called
MaximumAge Maximum age of cached item once an item reaches this age it will be automatically removed from the list
ResetMaximumAge If true, whenever the item is retrieved from the cache then the age of the item is reset
Count Returns number of cached items
Items Returns a list of all cached items


Finalize() Destructor
Add(string, CacheItem, boolean) Add's an item to the cached list
Get(string) Returns a cached item If the item isn't found, an event is raised to retrieve the item, subsequently adding it to the list of items
Clear() Clears all cache items
Remove(CacheItem) Removes a specific item from the cache
CleanCachedItems() Called to clean cached items, remove those that have expired etc
CleanAllCaches() Forces a clean up of all caches, removing older items that have expired
ClearAllCaches() Forces a clean up of all caches, removing all items
CacheExists(string) Returns the numer of caches
GetCache(string) Returns the numer of caches
GetCount() Returns the numer of caches
GetCacheName(Int32) Get's the name of the cache
GetCacheAge(Int32) Get's the maximum age of a cache
GetCacheCount(Int32) Returns the number of items in the cache


_cacheLockObject cache lock object
_allCaches List of all cache's created by application