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