Skip to content

Commit cfd4883

Browse files
committed
fix(cache): report HTTP 410 Gone on stale cache urls
Instead of 200 Ok fixes Elgg#14086
1 parent 5d68361 commit cfd4883

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

engine/classes/Elgg/Application/CacheHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ public function handleRequest(Request $request, Application $app) {
189189
$this->simplecache->cacheAsset($viewtype, $view, $content);
190190
} else {
191191
// if wrong timestamp, don't send HTTP cache
192+
// also report that the resource has gone away
193+
$response->setStatusCode(ELGG_HTTP_GONE);
194+
192195
$content = $this->getProcessedView($view, $viewtype);
193196
}
194197

0 commit comments

Comments
 (0)