Returns an entry from the cache.
Namespace: Casewhere.Runtime.DSL.ApiAssembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.5.0
SyntaxParameters
- key String
- The key.
Type Parameters
- T
- Type of the cached object.
Return Value
TA reference to the cache entry that is identified by key, if the entry exists; otherwise, It will throw an exception.
ExceptionsException | Condition |
---|
NotFoundException |
The exception is thrown when the cache system not contains the cached object with the key |
InvalidCastOperationException |
The exception is thrown when the cached object can't be cast to an specified type by generic type T.
|
Examplevar cacheApi = ctx.Use<ICacheApi>();
var entryValue = cacheApi.Get<object>("cache_key");
See Also