Skip to content

datasource.cacheExists ​

Checks whether a key is in the server-wide in-memory cache.

js
datasource.cacheExists(key)

Parameters ​

ParameterTypeDescription
keystringThe key.

Returns ​

boolean

true when the key is in the cache. false when it was never set or has expired.

Examples ​

js
if (!datasource.cacheExists("dailyRate")) {
    datasource.cacheSet("dailyRate", "1.52", 3600000);
}