restify-etag-cache
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "restify-etag-cache", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Restify ETag Cache. The easy way.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -11,3 +11,16 @@ # restify-etag-cache | ||
TO DO | ||
It works as a middleware, so its very easy to use the library: | ||
` | ||
var restify = require('restify'); | ||
var restifyEtagCache = require('restify-etag-cache'); | ||
var server = restify.createServer(); | ||
server.use(restifyEtagCache()); | ||
` | ||
Its all ;) | ||
The server will reply HTTP status code 304 (Not Modified) when it detects that the client already have the latest content version. | ||
5361
26