To disable specific parts of cache_core, you can write your own Backend and ignore set for this.
Here is an example Backend to disable ext_localconf and ext_tables Cache:
<?php
namespace VENDOR\ExtName\Cache\Backend;
/**
* A simple backend for "cache_core"
*
* @author Daniel Siepmann <daniel.siepmann@typo3.org>
*/
class CoreBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend {
protected $disabledCaches = array();
/**
* Saves data in a cache file.
*
* @param string $entryIdentifier An identifier for this specific cache entry
* @param string $data The data to be stored
* @param array $tags Tags to associate with this cache entry
* @param integer $lifetime Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.
* @return void
* @throws \TYPO3\CMS\Core\Cache\Exception if the directory does not exist or is not writable or exceeds the maximum allowed path length, or if no cache frontend has been set.
* @throws \TYPO3\CMS\Core\Cache\Exception\InvalidDataException if the data to bes stored is not a string.
* @throws \InvalidArgumentException
*/
public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
do {
if (empty( $this->disabledCaches )) {
continue;
}
foreach ($this->disabledCaches as $identifierPrefix) {
if (strpos( $entryIdentifier, $identifierPrefix ) === 0) {
return;
}
}
} while( false );
parent::set($entryIdentifier, $data, $tags, $lifetime);
}
public function setDisableForIdentifierPrefixes( array $prefixesForDisablingCache ) {
$this->disabledCaches = $prefixesForDisablingCache;
return $this;
}
}
?>
Add this Backend to your Extensions and configure it inside your AdditionalConfiguration.php:
// Setup our custom Cache Backend for early bootstrap.
TYPO3\CMS\Core\Core\Bootstrap::getInstance()->getEarlyInstance( 'TYPO3\CMS\Core\Core\ClassLoader' )
->setRuntimeClassLoadingInformationFromAutoloadRegistry(array(
'VENDOR\ExtName\Cache\Backend\CoreBackend' => PATH_site . 'typo3conf/ext/ext_key/Classes/Cache/Backend/CoreBackend.php',
)
);
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['backend'] = 'VENDOR\ExtName\Cache\Backend\CoreBackend';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['options'] = array(
'disableForIdentifierPrefixes' => array(
'ext_localconf',
'ext_tables',
)
);
Replace ExtName and VENDOR.
You can configure all existing prefixes inside the options and disable all specific parts of cache_core.