관리 메뉴

취미개발 블로그와 마음수양

SpringBoot Redis Prefix Key 제거 본문

개발관련 잡다/개발노트-글

SpringBoot Redis Prefix Key 제거

아라한사 2020. 8. 27. 02:00

https://stackoverflow.com/questions/53988595/remove-cache-name-from-generated-cache-key

 

Remove cache name from generated cache key

I would like to know if there is some way to remove the cache name from the generated cache key on Spring boot 2. This is the code i'm currently using to cache data: @Cacheable(value = "products"...

stackoverflow.com

https://stackoverflow.com/questions/39324717/spring-boot-caching-with-redis-key-have-xac-xed-x00-x05t-x00-x06

 

Spring boot caching with redis,key have \xac\xed\x00\x05t\x00\x06

I want to use Spring cache @Cacheable to manager cache. And the real cache is redis. my code like that: @PostMapping("/post") @CachePut(value = "abc", key = "#key") public String putInRedis(@

stackoverflow.com

https://stackoverflow.com/questions/19098079/how-to-get-all-keys-from-redis-using-redis-template

 

How to get all Keys from Redis using redis template

I have been stuck with this problem with quite some time.I want to get keys from redis using redis template. I tried this.redistemplate.keys("*"); but this doesn't fetch anything. Even with the pat...

stackoverflow.com

 

파이썬이랑 스프링부트랑 로컬에서 같이 돌리고 잇는데 키가 없다고 나와서 보니 스프링부트에서 이상한 캐시 prefix 키를 줘버리네.. 일단 제거.. 

 

정답은 defaultSerializer 를 StringRedisSerializer() 로해주면 됨

0 Comments
댓글쓰기 폼