From: quix0r Date: Tue, 5 Jul 2011 04:31:07 +0000 (+0000) Subject: Function is now cached X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f633671b77e5f4d6af531bfbd0af90673a715bed;p=mailer.git Function is now cached --- 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.