0.0.5 • Published 8 years ago

cache-box v0.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Cache Box

But a mere Javascript in-memory nested cache with DSL capabilities

Usage

var cacheBox = require( "cache-box" );

// set item to DSL cache path with nesting
cacheBox().set( 'user=>alice', { name: 'alice' } );

// get item from array cache path
cacheBox().get( [ 'user', 'alice' ] ); // { name: 'alice' }

// meanwhile somewhere else in the code...

// override item located in array cache path
cacheBox().set( [ 'user', 'alice' ], { name: 'alice', lastName: 'doe' } );

// get item from DSL cache path
cacheBox().get( 'user=>alice' ); // { name: 'alice', lastName: 'doe' }

// delete item from array cache path
cacheBox().delete( 'user=>alice' );
Options
  • seperator => DSL nesting path separator
0.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago