Feature #30006 ยป 30006.diff
t3lib/cache/backend/class.t3lib_cache_backend_abstractbackend.php | ||
---|---|---|
protected $cacheIdentifier;
|
||
/**
|
||
* @var boolean
|
||
*/
|
||
protected $manualFlush = FALSE;
|
||
/**
|
||
* The current application context
|
||
*
|
||
* TYPO3 v4 note: This variable is currently unused in v4 context and set to
|
||
... | ... | |
}
|
||
/**
|
||
* Sets whether flush of the caching tables will be handled manually.
|
||
*
|
||
* @param boolean $manualFlush Whether flush will be handled by the underlying extension
|
||
* @return void
|
||
* @api
|
||
*/
|
||
public function setManualFlush($manualFlush) {
|
||
$this->manualFlush = (bool)$manualFlush;
|
||
}
|
||
/**
|
||
* Returns TRUE if caching tables are manually flushed.
|
||
*
|
||
* @return boolean
|
||
* @api
|
||
*/
|
||
public function isManualFlush() {
|
||
return $this->manualFlush;
|
||
}
|
||
/**
|
||
* Sets the default lifetime for this cache backend
|
||
*
|
||
* @param integer $defaultLifetime Default lifetime of this cache backend in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
|
t3lib/cache/backend/interfaces/interface.t3lib_cache_backend_backend.php | ||
---|---|---|
public function setCache(t3lib_cache_frontend_Frontend $cache);
|
||
/**
|
||
* Sets whether flush of the caching tables will be handled manually.
|
||
*
|
||
* @param boolean $manualFlush Whether flush will be handled by the underlying extension
|
||
* @return void
|
||
* @api
|
||
*/
|
||
public function setManualFlush($manualFlush);
|
||
/**
|
||
* Returns TRUE if caching tables are manually flushed.
|
||
*
|
||
* @return boolean
|
||
* @api
|
||
*/
|
||
public function isManualFlush();
|
||
/**
|
||
* Saves data in the cache.
|
||
*
|
||
* @param string $entryIdentifier An identifier for this specific cache entry
|
t3lib/cache/class.t3lib_cache_manager.php | ||
---|---|---|
protected $cacheFactory;
|
||
/**
|
||
* @var array
|
||
* @var t3lib_cache_frontend_AbstractFrontend[]
|
||
*/
|
||
protected $caches = array();
|
||
... | ... | |
public function flushCaches() {
|
||
$this->createAllCaches();
|
||
foreach ($this->caches as $cache) {
|
||
$cache->flush();
|
||
if (!$cache->getBackend()->isManualFlush()) {
|
||
$cache->flush();
|
||
}
|
||
}
|
||
}
|
||