simplefilecache
v0.1.2
Published
Returns a getter function which keeps a cache of the file in memory and only re-reads the file if it has been modified
Downloads
3
Readme
Simple file cache
Usage
var simpleFileCache = require('simplefilecache');
var getTextFile = simpleFileCache('textfile.txt');
setInterval(function(){
getTextFile(function(err, content){
if(err)
console.log(err)
else
console.log("Content: " + content)
})
}, 5000);