If the cache-flush-buttons in the backend clicked (1) - or enable/disable a element on a page xy (2):
- should not the redis (page or all) caches cleared?
- should not cleared the page cache for page-id xy
The Class https://github.com/b13/graceful-cache/blob/main/src/Backend/RedisCacheBackend.php has flush-methods for that purpose I think.
Maybe I have miss-configured or not undersatnd completely the cache?
`// Frontend page caches (most accessed, long lifetime)
$redisCaches = [
'pages' => [
'lifetime' => 86400 * 30, // 30 days
'compression' => true, // Enable for large HTML content
],
...
];
$redisDatabaseNumber = 0;
foreach ($redisCaches as $cacheName => $cacheConfig) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheName] = [
// Use b13/graceful-cache wrapper for resilience
'backend' => \B13\GracefulCache\Backend\RedisCacheBackend::class,
'options' => [
'database' => $redisDatabaseNumber++,
'hostname' => $redisHost,
'port' => $redisPort,
'password' => $redisPassword,
'defaultLifetime' => $cacheConfig['lifetime'],
],
];
// Add compression option if specified
if (isset($cacheConfig['compression']) && $cacheConfig['compression'] === true) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheName]['options']['compression'] = true;
}
}`
Use TYPO3 v12.4.39
Thank you for your help!
If the cache-flush-buttons in the backend clicked (1) - or enable/disable a element on a page xy (2):
The Class https://github.com/b13/graceful-cache/blob/main/src/Backend/RedisCacheBackend.php has flush-methods for that purpose I think.
Maybe I have miss-configured or not undersatnd completely the cache?
`// Frontend page caches (most accessed, long lifetime)
$redisCaches = [
'pages' => [
'lifetime' => 86400 * 30, // 30 days
'compression' => true, // Enable for large HTML content
],
...
];
$redisDatabaseNumber = 0;
foreach ($redisCaches as $cacheName => $cacheConfig) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheName] = [
// Use b13/graceful-cache wrapper for resilience
'backend' => \B13\GracefulCache\Backend\RedisCacheBackend::class,
'options' => [
'database' => $redisDatabaseNumber++,
'hostname' => $redisHost,
'port' => $redisPort,
'password' => $redisPassword,
'defaultLifetime' => $cacheConfig['lifetime'],
],
];
// Add compression option if specified
if (isset($cacheConfig['compression']) && $cacheConfig['compression'] === true) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheName]['options']['compression'] = true;
}
}`
Use TYPO3 v12.4.39
Thank you for your help!