node-modules/diskstore

Name: diskstore

Owner: node_modules

Description: a local cache implement

Created: 2017-10-11 09:04:22.0

Updated: 2017-12-05 03:19:19.0

Pushed: 2018-03-08 11:00:25.0

Homepage: null

Size: 8

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

diskstore

a basic local cache implementation

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Introduction

A basic file cache implementation. It just providers low-level APIs (get, set, delete) to allow you read & atomic write from file cache. You can also create your implementation by inheriting or wrapping it.

Install
m install diskstore --save
APIs
Usage
t diskStore = new DiskStore({
cheDir: '/path/cache',


d diskStore.set('a/b/c', 'c');
data = yield diskStore.get('a/b/c');
rt.deepEqual(data, new Buffer('c'));

d diskStore.delete('a/b/c');
 = yield diskStore.get('a/b/c');
rt(data === null);
License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.