1.0.2 • Published 6 years ago

immutable-cache v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Immutable Cache

Configurable cache, based on immutable.js.

Example

import {Cache} from 'immutable-cache';

let cache = new Cache({maxSize: 100});

// cache key 'key' with value 'value'
cache = cache.set('key', 'value');

// check if key is cached
cache.has('key'); // true
cache.has('other-key'); // false

cache.get('key'); // 'value'
cache.get('other-key'); // undefined

Options

NameDescription
maxSizemaximum number of keys stored in cache

License

Immutable-Cache is freely distributable under the terms of the MIT license.

1.0.2

6 years ago

1.0.1

9 years ago

1.0.0

9 years ago