Procházet zdrojové kódy

#834 ability to clearr all memory cache

Alex Trofimov před 9 roky
rodič
revize
53434d12e7
1 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. 7 1
      inc/classes/BxDolDb.php

+ 7 - 1
inc/classes/BxDolDb.php

@@ -154,7 +154,7 @@ class BxDolDb extends BxDolFactory implements iBxDolSingleton
             $sStorageEngine = !$sVer || version_compare($sVer, '5.7.5', '>=') ? 'default_storage_engine' : 'storage_engine';
             $this->pdoExec("SET $sStorageEngine=" . $this->_sStorageEngine);
 
-			self::$_aDbCacheData = array();
+			$this->cleanMemoryAll();
     	}
     	catch (PDOException $oException) {
     		$oException->errorInfo[self::$_sErrorKey] = array(
@@ -784,6 +784,12 @@ class BxDolDb extends BxDolFactory implements iBxDolSingleton
 		return true;
     }
 
+    public function cleanMemoryAll ()
+    {
+        self::$_aDbCacheData = array();
+		return true;
+    }
+
     /**
      * It escapes string to pass to mysql query.
      * Try to use "prepare" function always (@see BxDolDb::prepare), use "escape" only if "prepare" function is not possible at all.