Click or drag to resize

ICacheApiTryGetT Method

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.5.0
Syntax
C#
bool 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

Boolean
True if the key is found in the cache; otherwise, False.
Example
C#
var cacheApi = ctx.Use<ICacheApi>();
var hasValue = cacheApi.TryGet<object>("cache_key", out object returnObject);
See Also