ScriptSettings

ScriptSettings

Stores settings for the SCRIPT. Long term cache storage for small tables.

Constructor

new ScriptSettings()

Description:
  • For storing cache data for very long periods of time.

Source:

Methods

delete(key)

Description:
  • Delete a specific key in script properties.

Source:
Parameters:
Name Type Description
key String

get(propertyKey) → {any}

Description:
  • Get script property using key. If not found, returns null.

Source:
Parameters:
Name Type Description
propertyKey String
Returns:
Type
any

put(propertyKey, propertyData, daysToHold)

Description:
  • Put data into our PROPERTY cache, which can be held for long periods of time.

Source:
Parameters:
Name Type Default Description
propertyKey String

key to finding property data.

propertyData any

value. Any object can be saved..

daysToHold Number 1

number of days to hold before item is expired.

putAll(propertyDataObject, daysToHold)

Source:
Parameters:
Name Type Default Description
propertyDataObject Object
daysToHold Number 1

(static) expire(deleteAll, maxDelete, allPropertiesObject)

Description:
  • Removes script settings that have expired.

Source:
Parameters:
Name Type Default Description
deleteAll Boolean

true - removes ALL script settings regardless of expiry time.

maxDelete Number 999

maximum number of items to delete that are expired.

allPropertiesObject Object null

All properties already loaded. If null, will load iteself.

(static) getAll(cacheKeys) → {Array.<any>}

Description:
  • Returns ALL cached data for each key value requested. Only 1 API call is made, so much faster than retrieving single values.

Source:
Parameters:
Name Type Description
cacheKeys Array.<String>
Returns:
Type
Array.<any>

(static) putAllKeysWithData(cacheKeys, newCacheData, daysToHold)

Description:
  • Puts list of data into cache using one API call. Data is converted to JSON before it is updated.

Source:
Parameters:
Name Type Default Description
cacheKeys Array.<String>
newCacheData Array.<any>
daysToHold Number 7