/** * Enables or disables caching of class instances. * * @param boolean $value True to enable caching, false to disable it. * @return boolean Previous cache setting */ public static function setCache($value) { $old = self::$_cache; self::$_cache = (bool) $value; return $old; }