Simple File Cache for NodeJS
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib
.gitattributes
.gitignore
README.md
index.js
package.json

README.md

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);