Helper functions for managing result-set cache.

Methods

(static) buildKey(optsopt) → {string}

Build a cache key for the result set.

Parameters:
NameTypeAttributesDefaultDescription
optsobject<optional>
{}

The options for building the cache key

Properties
NameTypeAttributesDescription
modelobject<optional>

The model associated with the result set

idstring<optional>

The ID of the result set

filterobject<optional>

The filter applied to the result set

optionsobject<optional>

Additional options for building the cache key

Returns:
  • Returns the generated cache key
Type: 
string

(async, static) clear(optsopt) → {Promise.<void>}

Clear cached result set items.

Parameters:
NameTypeAttributesDefaultDescription
optsobject<optional>
{}

The options for clearing the cached result set

Returns:
Type: 
Promise.<void>

(async, static) get(optsopt) → {Promise.<*>}

Get a cached result set item.

Parameters:
NameTypeAttributesDefaultDescription
optsobject<optional>
{}

The options for retrieving the cached result set

Returns:
  • Returns the cached result set item or false if not found
Type: 
Promise.<*>

(async, static) remove(optsopt) → {Promise.<void>}

Remove a cached result set item.

Parameters:
NameTypeAttributesDefaultDescription
optsobject<optional>
{}

The options for removing the cached result set

Returns:
Type: 
Promise.<void>

(async, static) set(optsopt) → {Promise.<void>}

Set a cached result set item.

Parameters:
NameTypeAttributesDefaultDescription
optsobject<optional>
{}

The options for setting the cached result set

Returns:
Type: 
Promise.<void>