1.0.2 • Published 9 years ago

smart-static-fs-cache v1.0.2

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

smart-static-fs-cache

Build Status

File system cache engine for smart-static.

How to Use

Usage: fsCache(cacheDir, options)

Example

var http = require('http');

var smartStatic = require('smart-static');
var fsCache = require('smart-static-fs-cache');

var server = http.createServer(smartStatic(serveDir, {
    cache: fsCache(yourCacheDir, {
        createDirectory: false
    })
));

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.

Options

There is only one available option for this plug-in.

NameTypeDefaultDescription
createDirectoryBooleanfalseCreate directory if it does not exist.

License

MIT

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago