Package Exports
- cache-point
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cache-point) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cache-point
Example
const Cache = require('cache-point')
const cache = new Cache({ cacheDir: '~/.cache' })
- cache-point
- Cache ⏏
- new Cache([options])
- .cacheDir :
string
- .read(keys) ⇒
Promise
- .write(keys, content) ⇒
Promise
- .getChecksum(keys) ⇒
string
- .clean() ⇒
Promise
- .remove() ⇒
Promise
- Cache ⏏
Cache ⏏
new Cache([options])
Param | Type |
---|---|
[options] | object |
[options.cacheDir] | string |
cache.cacheDir : string
Cache directory
Kind: instance property of Cache
cache.read(keys) ⇒ Promise
Cache hit resolves, miss rejects.
Kind: instance method of Cache
Param | Type | Description |
---|---|---|
keys | * |
One or more values to index the data, e.g. a request object or set of function args. |
cache.write(keys, content) ⇒ Promise
Write some data to the cache with a key.
Kind: instance method of Cache
Param | Type | Description |
---|---|---|
keys | * |
One or more values to index the data, e.g. a request object or set of function args. |
content | * |
the data to store |
cache.getChecksum(keys) ⇒ string
Converts a key value into a hex checksum.
Kind: instance method of Cache
Param | Type | Description |
---|---|---|
keys | * |
One or more values to index the data, e.g. a request object or set of function args. |
cache.clean() ⇒ Promise
Cleans the cache.
Kind: instance method of Cache
cache.remove() ⇒ Promise
Cleans and removes the cache.
Kind: instance method of Cache
© 2016 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.