Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2203

Redis - Multiple caches with different TTL

$
0
0

I'm working with Java 17 / Spring and this application.yml is working well.The problem is I need a different time-to-live for each cache:

10s for cache1

20s for cache2

spring:  cache:    cache-names: cache1, cache2    type: redis    redis:      time-to-live: 10s      key-prefix: rop      use-key-prefix: true      cache-null-values: false      enable-transaction-support: false  data:    redis:      url:redis://localhost:6379

I already tried some variations of this file, but none worked.any clue? Thanks in advance!


Viewing all articles
Browse latest Browse all 2203

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>