Is it possible to create multiple cache stores using Spring's cache abstraction with redis?

后端 未结 1 1381
北荒
北荒 2021-01-02 19:06

I\'m developing a web application using Spring MVC and I\'m using using spring\'s cache abstraction with Redis to cache my database queries. But I am not able to create mult

相关标签:
1条回答
  • 2021-01-02 19:38

    According to the docs the RedisCacheManager by default saves the keys directly, without appending a prefix (cache name, which acts as a namespace). To change it and avoid clashes set 'usePrefix' to 'true': http://static.springsource.org/spring-data/data-redis/docs/current/api/org/springframework/data/redis/cache/RedisCacheManager.html

    0 讨论(0)
提交回复
热议问题