MCPcopy Create free account
hub / github.com/cambecc/earth / cacheControl

Function cacheControl

dev-server.js:22–27  ·  view source on GitHub ↗

* Adds headers to a response to enable caching.

()

Source from the content-addressed store, hash-verified

20 * Adds headers to a response to enable caching.
21 */
22function cacheControl() {
23 return function(req, res, next) {
24 res.setHeader("Cache-Control", "public, max-age=300");
25 return next();
26 };
27}
28
29function logger() {
30 express.logger.token("date", function() {

Callers 1

dev-server.jsFile · 0.85

Calls 1

nextFunction · 0.85

Tested by

no test coverage detected