mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +01:00
Avoid orphaned cache files from breaking the caching layer.
(cherry picked from commit 57d0a2e803
)
This commit is contained in:
parent
ca91c0c403
commit
c0fc7f9b0c
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ CachingMiddleware.prototype = new function () {
|
||||||
var modifiedSince = (req.headers['if-modified-since']
|
var modifiedSince = (req.headers['if-modified-since']
|
||||||
&& new Date(req.headers['if-modified-since']));
|
&& new Date(req.headers['if-modified-since']));
|
||||||
var lastModifiedCache = !error && stats.mtime;
|
var lastModifiedCache = !error && stats.mtime;
|
||||||
if (lastModifiedCache) {
|
if (lastModifiedCache && responseCache[cacheKey]) {
|
||||||
req.headers['if-modified-since'] = lastModifiedCache.toUTCString();
|
req.headers['if-modified-since'] = lastModifiedCache.toUTCString();
|
||||||
} else {
|
} else {
|
||||||
delete req.headers['if-modified-since'];
|
delete req.headers['if-modified-since'];
|
||||||
|
|
Loading…
Reference in a new issue