From f633671b77e5f4d6af531bfbd0af90673a715bed Mon Sep 17 00:00:00 2001 From: quix0r Date: Tue, 5 Jul 2011 04:31:07 +0000 Subject: [PATCH] Function is now cached --- inc/wrapper-functions.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 46d999cddc..db62ffb5d1 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -432,7 +432,14 @@ function isDebugRegularExpressionEnabled () { // Checks wether the cache instance is valid function isCacheInstanceValid () { - return ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance']))); + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance']))); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; } // Copies a file from source to destination and verifies if that goes fine. -- 2.39.5