示例#1
0
 /**
  * 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();
     }
 }