Add add key, cached item and the token for the lifetime
AddIfNotExists add key, cached iem and the token for the lifetime. If the key has already existed, the getvalues action will not invoked.
AddRange add a collection of data to the cache. It is recommended to enclose the AddRange with BeginAddRange and EndAddRange
BeginAddRange Begin to add the range of data. Actually, it will add a lock on the cache items. The cache items are not accessible if they are locked.
EndAddRange End to add the range of data. It will release the lock on the cached items.
Remove remove the cache item with the key
Get get the cache item with the key
TryGet try to get the cache item with the key.
GetWithCreate try to get teh cache item with the key. If the cache item is not existing, the create action will be invoked to create the cache item.
Reset clear the cache item
Count return the number of cache items


Add add the ICacheJob object
Init initialize the caches. It will run in a seperate thread
IsIniJobStart a flag indicating all the caches are ready to initialize
WaitWhileInitStart block the main thread to wait the IsIniJobStart set to true
ResetCaches reset the caches in the cachemanager
RemoveAllCaches remove all caches in the cache manager
Dispose dispose all the caches and stop the background work thread


IsCurrent a property for determining if the cache item is still live. If it returns false, it will be removed from the cache.
Renew update the lifetime of the cache item.


Reset Reset the cache. All the cache items will be removed.
CheckExpireation Check the cache items. If expired cache items are found out, they will be removed.

Last edited Jul 29, 2011 at 2:04 PM by czy, version 4


No comments yet.