Base

Base

Base class for shared logic

Constructor

new Base(optionsopt)

Constructor for a Base object

Source:
Parameters:
Name Type Attributes Description
options Object <optional>

Options for this object, copied onto itself

Methods

_cache(key, value)

Cache a new key/value pair

Source:
Parameters:
Name Type Description
key String

Key to be cached

value *

Value to be cached

_cached(key)

Get cached value for a given key

Source:
Parameters:
Name Type Description
key String

Key to return value for from cache

_isCached(key)

Check if a given key is cached

Source:
Parameters:
Name Type Description
key String

Key to check for in the cache

_params() → {Object}

Construct params object, starting with this.defaultParams

Source:
Returns:
Type:
Object
  • Returns any params given merged ontop of defaultParams

clearCache(keyopt)

Clear key (or all keys) from cache

Source:
Parameters:
Name Type Attributes Description
key String <optional>

Optional key to clear from cache, otherwise clear all