New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis TTL does not work #116
Comments
can the author provide a configuration item in yml to set the keys ttl? because if you set ip address as key ,household ip addres will often change, when ip changed the previous ip were untouchable and finally turn to diry data. |
I tried everything with |
The problem still exists when setting the default redis ttl globally, it is simply not used. |
@ttulka You've added the Redis Support in this project and also add Support for Jedis in the Bucket4j project bucket4j/bucket4j#275. I haven't used Redis yet and I would be very thankful for your help. I even don't understand the real problem. |
Oh, I've found this one: |
Yes, I added Redis support to bucket4j, so the whole |
I use redis as a cache but I can't configure TTL on the redis level. I think it is because the naming in redis is different to what I configured it:
some of the Bucket4j configs:
Redis:
Cache TTL Setting:
@Configuration class RedisConfig { @Bean fun redisCacheManagerBuilderCustomizer(): RedisCacheManagerBuilderCustomizer { return RedisCacheManagerBuilderCustomizer { builder: RedisCacheManagerBuilder -> configurationMap["bucket4j"] = RedisCacheConfiguration.defaultCacheConfig() .entryTtl(Duration.ofHours(48)) builder.withInitialCacheConfigurations(configurationMap) } } }
The text was updated successfully, but these errors were encountered: