1. Javascript SDK

Class EntityDefinitionCache

Caches definition in memory.

Constructors

EntityDefinitionCache()

Declaration

new EntityDefinitionCache()

Functions

load(definition)

Load the specified definition into the cache.

Declaration

function load(definition)

Parameters

TypeNameDescription
definitionThe entity definition

get(key)

Retrieve the definition with specified name or id from the cache.

Declaration

function get(key)

Parameters

TypeNameDescription
keyThe definition name or definition id

Returns

TypeDescription
The cached definition or null

loadAll(definitions, loadAllIndividually, loadAsGroup)

Loads all definitions into the cache.

Declaration

function loadAll(definitions, loadAllIndividually, loadAsGroup)

Parameters

TypeNameDescription
definitionsAn array of entity definitions
loadAllIndividuallyFlag indicating whether to load the definitions individually or not
loadAsGroupKey to be used to store the array of definitions, or false to not load the array

getAll(group)

Retrieves an array of definitions that was cached with the specified group key.

Declaration

function getAll(group)

Parameters

TypeNameDescription
groupThe key with which the group of definitions was stored

invalidate(key)

Invalidates/removes the definition with specified name or id from the cache.

Declaration

function invalidate(key)

Parameters

TypeNameDescription
keyThe definition name or definition id
If you have suggestions for improving this article, let us know!