express-etaggable
Express middleware that handles the Etag caching mechanism for you and only calls the dynamic function to load the content when needed.
Usage
response.etaggable(etag, loadContentFn);
Example:
var etaggable = ;var express = ;var app = ; var { return ;}; app; app;
Motivation
In case you already know the Etag for a page it doesn't make sense to also load its content each time.
Tests
npm test
License
MIT