Create namespaced sub caches for transform caches.
Install with npm
npm i sub-cache --save
npm test
var SubCache = require('sub-cache');
Create a namespaced sub cache when given a transform-cache instance
-
cache
{Object}: Instance of a [transform-cache]. -
namespace
{String}: Namespace to use
var Cache = require('transform-cache');
var SubCache = require('sub-cache');
var cache = new Cache();
var subA = new SubCache(cache, 'a');
var subB = new SubCache(cache, 'b');
subA.set('foo', 'bar');
//=> cache.a.foo: 'bar'
subB.set('foo', 'baz');
//=> cache.b.foo: 'baz'
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Brian Woodward
Copyright (c) 2015 Brian Woodward
Released under the MIT license
This file was generated by verb on February 03, 2015.
[transform-cache][https://github.com/doowb/transform-cache/]