cache-file
Store and get files from cache with Node.js.
Getting started
Install with npm: npm install cache-file
Examples
var cache = ; // store test.jpg inside a test folder in cachecache; // get test.jpg from cache and save it as test-restored.jpgcache; // check if test.jpg exists in cachecache; // get the path to test.jpg in cachecache; // remove test.jpg from cachecache;
API
.store(src, dest)
Store a file inside cache. Use dest
to specify a custom name.
.get(src, dest)
Get a cached file and save it to a desired location.
.check(src)
Check if a cached file exists.
.path(src)
Get the path to a cached file.
.clean(src)
Remove a file from cache.