From a88e45243afff71d103fec7440b219de8bdd79f5 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 23 Feb 2013 11:46:38 -0500 Subject: Fixes #4883 do not regenerate cache when someone requests a non cached view --- engine/handlers/cache_handler.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engine/handlers/cache_handler.php') diff --git a/engine/handlers/cache_handler.php b/engine/handlers/cache_handler.php index 7706c2c92..9848d3531 100644 --- a/engine/handlers/cache_handler.php +++ b/engine/handlers/cache_handler.php @@ -93,7 +93,12 @@ if (file_exists($filename)) { // someone trying to access a non-cached file or a race condition with cache flushing mysql_close($mysql_dblink); require_once(dirname(dirname(__FILE__)) . "/start.php"); - elgg_regenerate_simplecache(); + + global $CONFIG; + if (!isset($CONFIG->views->simplecache[$view])) { + header("HTTP/1.1 404 Not Found"); + exit; + } elgg_set_viewtype($viewtype); $contents = elgg_view($view); -- cgit v1.2.3