1.0.2 • Published 9 years ago

smart-static-mem-cache v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

smart-static-mem-cache

Build Status

Memory cache engine for smart-static.

How to Use

Usage: memCache()

Example

var http = require('http');

var smartStatic = require('smart-static');
var memCache = require('smart-static-mem-cache');

var server = http.createServer(smartStatic(serveDir, {
    cache: memCache()
}));

server.listen(8000);

Remark. It does not make sense to use caching without template engine plug-ins - as only template renderings are cached. See smart-static for available template plug-ins.

Memory Usage

This plug-in keeps all cache in memory and it does not take memory usage into account.

If you need large amounts of caching - e.g. you have many templates - it is recommended to use the smart-static-fs-cache file system cache plug-in.

License

MIT