mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Merge pull request #863 from romainneutron/purge
[3.9] Reduce memory usage
This commit is contained in:
@@ -47,12 +47,6 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
*/
|
||||
protected $_prefs = [];
|
||||
|
||||
/**
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $_users = [];
|
||||
|
||||
/**
|
||||
*
|
||||
* @var array
|
||||
@@ -1352,4 +1346,9 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
public static function purge()
|
||||
{
|
||||
self::$_instance = [];
|
||||
}
|
||||
}
|
||||
|
@@ -27,12 +27,6 @@ class appbox extends base
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var appbox
|
||||
*/
|
||||
protected static $_instance;
|
||||
|
||||
/**
|
||||
*
|
||||
* constant defining the app type
|
||||
|
@@ -465,4 +465,9 @@ class caption_Field_Value implements cache_cacheableInterface
|
||||
|
||||
unset(self::$localCache[$this->get_cache_key($option)]);
|
||||
}
|
||||
|
||||
public static function purge()
|
||||
{
|
||||
self::$localCache = [];
|
||||
}
|
||||
}
|
||||
|
@@ -448,4 +448,9 @@ class caption_field implements cache_cacheableInterface
|
||||
{
|
||||
unset(self::$localCache[$this->get_cache_key($option)]);
|
||||
}
|
||||
|
||||
public static function purge()
|
||||
{
|
||||
self::$localCache = [];
|
||||
}
|
||||
}
|
||||
|
@@ -730,4 +730,9 @@ class collection implements cache_cacheableInterface
|
||||
{
|
||||
return $this->databox->delete_data_from_cache($this->get_cache_key($option));
|
||||
}
|
||||
|
||||
public static function purge()
|
||||
{
|
||||
self::$_collections = [];
|
||||
}
|
||||
}
|
||||
|
@@ -53,7 +53,7 @@ class connection
|
||||
*/
|
||||
public static function printLog(Application $app)
|
||||
{
|
||||
if (!$app['debug']) {
|
||||
if ($app->getEnvironment() !== Application::ENV_DEV) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -1464,4 +1464,9 @@ class databox extends base
|
||||
}
|
||||
parent::delete_data_from_cache($option);
|
||||
}
|
||||
|
||||
public static function purge()
|
||||
{
|
||||
self::$_xpath_thesaurus = self::$_dom_thesaurus = self::$_thesaurus = self::$_sxml_thesaurus = [];
|
||||
}
|
||||
}
|
||||
|
@@ -1071,4 +1071,9 @@ class databox_field implements cache_cacheableInterface
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static function purge()
|
||||
{
|
||||
self::$_instance = [];
|
||||
}
|
||||
}
|
||||
|
@@ -587,4 +587,9 @@ class databox_status
|
||||
|
||||
return $status;
|
||||
}
|
||||
|
||||
public static function purge()
|
||||
{
|
||||
self::$_status = self::$_statuses = [];
|
||||
}
|
||||
}
|
||||
|
@@ -236,4 +236,9 @@ class patch_320alpha4b implements patchInterface
|
||||
|
||||
return $feed;
|
||||
}
|
||||
|
||||
public static function purge()
|
||||
{
|
||||
self::$feeds = [];
|
||||
}
|
||||
}
|
||||
|
@@ -35,4 +35,9 @@ class thesaurus_xpath extends DOMXPath
|
||||
|
||||
return(self::$r[$context_path]);
|
||||
}
|
||||
|
||||
public static function purge()
|
||||
{
|
||||
self::$r = [];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user