is-fresh
Check whether cache can be used in this HTTP request.
Install
npm install is-fresh
API
'use strict'const isFresh =
isFresh(req, res)
- req: an instance of
http.incomingMessage
- res: an instance of
http.ServerResponse
Return true
when cache can be used in this HTTP request, otherwise it will return false
.