Socket
Socket
Sign inDemoInstall

flat-cache

Package Overview
Dependencies
4
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "flat-cache",
"version": "1.0.2",
"version": "1.0.3",
"description": "A stupidly simple key/value storage using files to persist the data",

@@ -5,0 +5,0 @@ "repository": "royriojas/flat-cache",

@@ -16,5 +16,6 @@ # flat-cache

```js
var flatCache = require('flat-cache')
// loads the cache, if one does not exists for the given
// Id a new one will be prepared to be created
var cache = require('flat-cache').load('cacheId');
var cache = flatCache.load('cacheId');

@@ -35,3 +36,10 @@ // sets a key on the cache

// not exists for the given Id a new one will be prepared to be created
var cache = require('flat-cache').load('cacheId', path.resolve('./path/to/folder'));
var cache = flatCache.load('cacheId', path.resolve('./path/to/folder'));
// The following methods are useful to clear the cache
// delete a given cache
flatCache.clearCacheById('cacheId') // removes the cacheId document if one exists.
// delete all cache
flatCache.clearAll(); // remove the cache directory
```

@@ -38,0 +46,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc