Class: LRUCache

ol/structs/LRUCache~LRUCache


Implements a Least-Recently-Used cache where the keys do not conflict with Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring items from the cache is the responsibility of the user.

Fires:
  • default

Methods

setSize(size)

Set a maximum number of entries for the cache.

Name Type Description
size number

Cache size.