0.1.2 • Published 9 years ago

sub-cache v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

sub-cache NPM version

Create namespaced sub caches for transform caches.

Install

Install with npm

npm i sub-cache --save

Run tests

npm test

Usage

var SubCache = require('sub-cache');

API

SubCache

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'

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Brian Woodward

License

Copyright (c) 2015 Brian Woodward
Released under the MIT license


This file was generated by verb on February 03, 2015.

transform-cache

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago