Socket
Book a DemoInstallSign in
Socket

streamstache-cache

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streamstache-cache

A production file cache for streamstache.

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

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

streamstache

FAQs

Package last updated on 21 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts