MM-62079: Using a cache prefix to isolate cache keys for each test (#30261)

```release-note
A new config setting CacheSettings.RedisCachePrefix has been added which can be used to add a prefix to all Redis cache keys.
```
Этот коммит содержится в:
Agniva De Sarker
2025-02-25 09:22:15 +05:30
коммит произвёл GitHub
родитель e5755c925a
Коммит 4e5cb16955
5 изменённых файлов: 23 добавлений и 13 удалений

Просмотреть файл

@@ -974,6 +974,7 @@ type CacheSettings struct {
RedisAddress *string `access:",write_restrictable,cloud_restrictable"` // telemetry: none
RedisPassword *string `access:",write_restrictable,cloud_restrictable"` // telemetry: none
RedisDB *int `access:",write_restrictable,cloud_restrictable"` // telemetry: none
RedisCachePrefix *string `access:",write_restrictable,cloud_restrictable"` // telemetry: none
DisableClientCache *bool `access:",write_restrictable,cloud_restrictable"` // telemetry: none
}
@@ -994,6 +995,10 @@ func (s *CacheSettings) SetDefaults() {
s.RedisDB = NewPointer(-1)
}
if s.RedisCachePrefix == nil {
s.RedisCachePrefix = NewPointer("")
}
if s.DisableClientCache == nil {
s.DisableClientCache = NewPointer(false)
}