Skip to content

channelCache.getValue

Signature: channelCache.getValue(key, defaultValue*)

Returns: String value - the value associated with the key

Get the value associated with the key.

Parameters

Type Name Description Default
String key a unique string used to identify the cached value
String defaultValue* (optional) the value to return if no value is associated with the key null

Example

// Get a value from the channel cache
var value = channelCache.getValue("channelCacheVariable"); // <value>

// Get a value with a default if the key does not exist
var fallbackValue = channelCache.getValue("missingKey", "default"); // default