Registered as cachefactory
in NPM and Bower.
Examples
npm i --save cachefactory
bower i --save cachefactory
<script src="/path/to/cachefactory.min.js"></script>
var cacheFactory = new require('cachefactory').CacheFactory();
import { CacheFactory } from 'cachefactory';
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;