Avoid orphaned cache files from breaking the caching layer.
(cherry picked from commit 57d0a2e803d8efd2721c575e225bc9d90910d6d3)
This commit is contained in:
parent
ca91c0c403
commit
c0fc7f9b0c
@ -55,7 +55,7 @@ CachingMiddleware.prototype = new function () {
|
||||
var modifiedSince = (req.headers['if-modified-since']
|
||||
&& new Date(req.headers['if-modified-since']));
|
||||
var lastModifiedCache = !error && stats.mtime;
|
||||
if (lastModifiedCache) {
|
||||
if (lastModifiedCache && responseCache[cacheKey]) {
|
||||
req.headers['if-modified-since'] = lastModifiedCache.toUTCString();
|
||||
} else {
|
||||
delete req.headers['if-modified-since'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user