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 = require('cachefactory');
import CacheFactory from 'cachefactory';
define('myApp', ['cachefactory'], function (CacheFactory) { ... })
Members
(static) BinaryHeap :function
The BinaryHeap
constructor function.
Type:
- function
- Source:
- See:
Example
import CacheFactory from 'cachefactory';
const { BinaryHeap } = CacheFactory;
(static) Cache :function
The Cache constructor function.
Type:
- function
Example
import CacheFactory from 'cachefactory';
const { Cache } = CacheFactory;
(static) defaults :object
The default cache values. Modify this object to change the default values.
Type:
- object
Example
import CacheFactory from 'cachefactory';
const { defaults } = 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 from 'cachefactory';
const { utils } = CacheFactory;
// Make this library use your Promise lib
utils.Promise = Promise;