mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
add method clearCache()
This commit is contained in:
parent
fbe13a87f1
commit
ada7c1d692
|
@ -220,6 +220,27 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
$this->_notifyList = array();
|
||||
$this->_latestContent = null;
|
||||
$this->_content = null;
|
||||
/* Cache */
|
||||
$this->clearCache();
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Clear cache of this instance.
|
||||
*
|
||||
* The result of some expensive database actions (e.g. get all subfolders
|
||||
* or documents) will be saved in a class variable to speed up consecutive
|
||||
* calls of the same method. If a second call of the same method shall not
|
||||
* use the cache, then it must be cleared.
|
||||
*
|
||||
*/
|
||||
public function clearCache() { /* {{{ */
|
||||
$this->_parent = null;
|
||||
$this->_owner = null;
|
||||
$this->_documentLinks = null;
|
||||
$this->_documentFiles = null;
|
||||
$this->_content = null;
|
||||
$this->_accessList = null;
|
||||
$this->_notifyList = null;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user