TryGetCacheEntry Method
Definition
- Assemblies
- Cuemon.Runtime.Caching.dll
TryGetCacheEntry(string, out CacheEntry)
Attempts to get the CacheEntry associated with the specified key from the cache.
public bool TryGetCacheEntry(string key, out CacheEntry cacheEntry)
Parameters
keystringThe unique identifier for the cache entry.
cacheEntryCacheEntryWhen this method returns, contains the cache entry associated with the specified
key, ornullif the operation failed.
Returns
- bool
trueif thecacheEntrywas found in the cache; otherwise,false.
TryGetCacheEntry(string, string, out CacheEntry)
Attempts to get the CacheEntry associated with the specified key and ns from the cache.
public bool TryGetCacheEntry(string key, string ns, out CacheEntry cacheEntry)
Parameters
keystringThe unique identifier for the cache entry.
nsstringThe optional namespace that provides a scope to the cache.
cacheEntryCacheEntryWhen this method returns, contains the cache entry associated with the specified
keyandns, ornullif the operation failed.
Returns
- bool
trueif thecacheEntrywas found in the cache; otherwise,false.
Exceptions
- ArgumentNullException
keycannot be null.