Skip to content

messageCache.checkValueExists

Signature: messageCache.checkValueExists(key)

Returns: Boolean exists - true if a value is found, false if a value is not found

Check for the existence of a value associated with the key.

Parameters

Type Name Description Default
String key a unique string used to identify the cached value

Example

// Check whether a cached value exists for the given key
if (messageCache.checkValueExists("key")) {
    // The key is set, so it can be read without supplying a default value.
}