Feature #95172
closedSupport different connections for read and write access to redis
0%
Description
If you have multiple redis containers with replications you will want to read from one redis instance and write to the other.
At the moment, the TYPO3 redis caching backend doesn't support configuring separate connectivity configuration for read and write.
Suggestion:
The possibility to configure one connection should be kept as it is for simplicity and backwards compatibility. Additionally the keys read
and write
can override individual options of the default connection.
SYS:
caching:
cacheConfigurations:
extbase:
backend: '\TYPO3\CMS\Core\Cache\Backend\RedisBackend'
options:
defaultLifetime: 31536000
hostname: '%env(REDIS_REPLICA)%'
port: 6379
database: 0
write:
hostname: '%env(REDIS_MASTER)%'
Updated by Benni Mack almost 3 years ago
- Status changed from New to Rejected
Hey Sebastian,
I do have a same issue with various other topics (read+write DB API). In my case, this is project-specific, so I used a different Backend (or in my case a RedisBackend). It should be fairly simple to do this via an extension / composer package for the ecosystem and implement this with just a custom class.
One other use case was to create my own RedisBackend: https://github.com/b13/graceful-cache
In general, the Redis (Sentinel) or DB (Galera) should manage read/write access. This is a nice feature, but really something for an extension and not for TYPO3 Core. Sorry.