TryGet Method
Definition
- Assemblies
- Cuemon.Runtime.Caching.dll
TryGet(string, out object)
Attempts to get the value associated with the specified key from the cache.
bool TryGet(string key, out object value)
Parameters
keystringThe unique identifier for the cache entry.
valueobjectWhen this method returns, contains the value associated with the specified
key, ornullif the operation failed.
Returns
- bool
trueif thevaluewas found in the cache; otherwise,false.
TryGet(string, string, out object)
Attempts to get the value associated with the specified key and ns from the cache.
bool TryGet(string key, string ns, out object value)
Parameters
keystringThe unique identifier for the cache entry.
nsstringThe optional namespace that provides a scope to the cache.
valueobjectWhen this method returns, contains the value associated with the specified
keyandns, ornullif the operation failed.
Returns
- bool
trueif thevaluewas found in the cache; otherwise,false.