Class: Cache

(package) caching.Cache(capacity)

A Cache object represents a cache of arbitrary data.

Constructor

(package) new Cache(capacity)

Creates a cache.

Parameters:
Name Type Description
capacity number

The maximum number of entries that can exist in the cache.

Source:

Methods

set(keynullable, valuenullable)

Writes an entry to the cache.

If the cache has reached the specified maximum number of entries, all the old entries are cleared first.

Parameters:
Name Type Attributes Description
key * <nullable>

The key for the entry.

value * <nullable>

The value of the entry.

Source: