CacheManager
Source: PhyxCacheManager.js:13
phyx.js needs to cache several kinds of data to avoid reparsing them over and over again, such as scientific names. This CacheManager provides that facility, and allows users of this library to clear the cache as needed.
We might want to replace this with a cache that limits the amount of memory, such as https://www.npmjs.com/package/safe-memory-cache.
Constructor
new CacheManager(): CacheManagerConstruct a new cache manager.
Instance Methods
clear()
Clear all current caches.
has()
Return true if we have a value for this particular cache key.
get()
Look up the value of a key in a particular cache.
put()
Set the value of a key in a particular cache.