function __destruct() { if ($this->bitCacheSaveRequired && class_config::getInstance()->getConfig('resourcecaching') == true) { class_apc_cache::getInstance()->addValue(__CLASS__ . "classes", $this->arrClassCache); file_put_contents($this->strObjectsCacheFile, serialize($this->arrClassCache)); } }
/** * Constructor */ private function __construct() { $this->objApcCache = class_apc_cache::getInstance(); //any caches to load from session? $this->arrCacheTemplates = $this->objApcCache->getValue("templateSessionCacheTemplate", $this->arrCacheTemplates); $this->arrCacheTemplateSections = $this->objApcCache->getValue("templateSessionCacheTemplateSections", $this->arrCacheTemplateSections); }
public function __destruct() { //save texts to session if ($this->bitSaveToCache) { class_apc_cache::getInstance()->addValue("textSessionCache", $this->arrTexts, class_config::getInstance()->getConfig("textcachetime")); class_apc_cache::getInstance()->addValue("textSessionFallbackCache", $this->arrFallbackTextEntrys, class_config::getInstance()->getConfig("textcachetime")); } }
/** * internal destructor */ function __destruct() { if (self::$bitCacheSaveRequired && class_config::getInstance()->getConfig('resourcecaching') == true) { class_apc_cache::getInstance()->addValue("reflection", self::$arrAnnotationsCache); file_put_contents(self::$strAnnotationsCacheFile, serialize(self::$arrAnnotationsCache)); self::$bitCacheSaveRequired = false; } }
/** * Stores the currently cached entries back to the filesystem - if required. */ public function __destruct() { if ($this->bitCacheSaveRequired && class_config::getInstance()->getConfig('resourcecaching') == true) { class_apc_cache::getInstance()->addValue(__CLASS__ . "templates", $this->arrTemplates); class_apc_cache::getInstance()->addValue(__CLASS__ . "foldercontent", $this->arrFoldercontent); class_apc_cache::getInstance()->addValue(__CLASS__ . "langfiles", $this->arrLangfiles); file_put_contents($this->strTemplatesCacheFile, serialize($this->arrTemplates)); file_put_contents($this->strFoldercontentCacheFile, serialize($this->arrFoldercontent)); file_put_contents($this->strFoldercontentLangFile, serialize($this->arrLangfiles)); } }
/** * A general helper to flush the systems various caches. * * @param int $intCacheType A bitmask of caches to be flushed, e.g. class_carrier::INT_CACHE_TYPE_DBQUERIES | class_carrier::INT_CACHE_TYPE_ORMCACHE */ public function flushCache($intCacheType = 0) { if ($intCacheType & self::INT_CACHE_TYPE_DBQUERIES) { $this->getObjDB()->flushQueryCache(); } if ($intCacheType & self::INT_CACHE_TYPE_DBSTATEMENTS) { $this->getObjDB()->flushPreparedStatementsCache(); } if ($intCacheType & self::INT_CACHE_TYPE_DBTABLES) { $this->getObjDB()->flushTablesCache(); } if ($intCacheType & self::INT_CACHE_TYPE_ORMCACHE) { class_orm_rowcache::flushCache(); } if ($intCacheType & self::INT_CACHE_TYPE_OBJECTFACTORY) { class_objectfactory::getInstance()->flushCache(); } if ($intCacheType & self::INT_CACHE_TYPE_MODULES) { class_module_system_module::flushCache(); } if ($intCacheType & self::INT_CACHE_TYPE_CLASSLOADER) { class_classloader::getInstance()->flushCache(); } if ($intCacheType & self::INT_CACHE_TYPE_APC) { class_apc_cache::getInstance()->flushCache(); } if ($intCacheType & self::INT_CACHE_TYPE_CHANGELOG) { $objChangelog = new class_module_system_changelog(); $objChangelog->processCachedInserts(); } }