Registered as cachefactory in NPM and Bower.
Examples
Install from NPM
npm i --save cachefactoryInstall from Bower
bower i --save cachefactoryLoad into your app via script tag
<script src="/path/to/cachefactory.min.js"></script>Load into your app via CommonJS
var cacheFactory = new require('cachefactory').CacheFactory();Load into your app via ES2015 Modules
import { CacheFactory } from 'cachefactory';Load into your app via AMD
define('myApp', ['cachefactory'], function (cachefactory) {
  const cacheFactory = new cachefactory.CacheFactory();
});Members
(static) BinaryHeap :function
The BinaryHeap constructor function.
Type:
- function
- Source:
- See:
Example
import { BinaryHeap, CacheFactory } from 'cachefactory';(static) Cache :function
The Cache constructor function.
Type:
- function
Example
import { Cache, CacheFactory } from 'cachefactory';(static) defaults :object
The default cache values. Modify this object to change the default values.
Type:
- object
Example
import { CacheFactory, defaults } from 'cachefactory';
// Change the default "maxAge" for caches that will be instantiated
// after this point.
defaults.maxAge = 60 * 60 * 1000;(static) utils :object
Utility functions used throughout this library.
Type:
- object
Example
import Promise from 'bluebird';
import { CacheFactory, utils } from 'cachefactory';
// Make this library use your Promise lib
utils.Promise = Promise;