• CacheManager

Contents

CacheManager

Namespace: Shared.Classes

Assembly: SharedLib

Cache Manager

Constructors

Properties

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

Methods

Finalize() Destructor
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
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
Add(String, Shared.Classes.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(Shared.Classes.CacheItem) Removes a specific item from the cache
CleanCachedItems() Called to clean cached items, remove those that have expired etc

Fields

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