I would like to set a custom cache key prefix for my application which uses xml configuration for my RedisCacheManager, my goal is, if the cache key is student-detail, the cache key should be test :: student-detail or prod :: student-detail, I have already set usePrefix to true, but I cant find a way to define the actual key value. Here below an extract of my cacheManager configuration.
<bean id="cacheManager" class="org.springframework.data.redis.cache.RedisCacheManager"
c:redisOperations-ref="redisTemplate"
c:defaultExpiration=3600
c:usePrefix="true">
</bean>
For the information, I know in spring boot is as simple as setting a property in the application properties as :
spring.cache.redis.key-prefix=some::
spring.cache.redis.use-key-prefix=true
Just to put some context why I precised for non spring boot java application.