Get item from cached if return true, otherwise it returns false
Namespace:
Casewhere.Runtime.DSL.Api
Assembly:
Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.1.0
Syntax bool TryGet<T>(
string key,
out T data
)
Parameters
- key
- Type: SystemString
The key. - data
- Type: T
The cached data object.
Type Parameters
- T
- Type of the cached object.
Return Value
Type:
BooleanTrue if the key is found in the cache; otherwise, False.
Examples var cacheApi = ctx.Use<ICacheApi>();
var hasValue = cacheApi.TryGet<object>("cache_key", out object returnObject);
See Also