Skip to content

messageCache.getValue

Signature: messageCache.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 message cache
var value = messageCache.getValue("key"); // <value>

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