Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

streamstache-cache

0.0.1 • Public • Published

streamstache-cache

A simple filesystem cache for streamstache.

Example

var Cached = require('streamstache-cache');
var tpl = Cached(__dirname + '/simple.html');
 
http.createServer(function(req, res) {
    tpl({ foo: 'bar' }).pipe(res);
});

API

Cached(path)

Return a function that takes an optional scope and returns a new streamstache instance for the template under path.

Attention

The initial caching is done using a fs.readFileSync, so always create the cache at bootup time.

Installation

With npm do:

npm install streamstache-cache

License

MIT

Keywords

none

install

npm i streamstache-cache

Downloadsweekly downloads

1

version

0.0.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability