different method cache key, second method will follow the first method TTL
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
## version : `com.alicp.jetcache: jetcache-starter-redis-lettuce: 2.6.0`
## case
while have 2 method as below:
```java
@Cached(area = "area", name = ":test:", key = "'def'", expire = 2, timeUnit = TimeUnit.HOURS)
public List test1(Instant startTime, Instant endTime) {
System.out.println("############# execute 1");
return new ArrayList();
}
@Cached(area = "area", name = ":test:", key = "'abc'", expire = 1, timeUnit = TimeUnit.HOURS)
public List test2(Instant startTime, Instant endTime) {
System.out.println("############# execute 2");
return new ArrayList();
}
```
## occurs
1. while execute method `test1` and then `test2`, both key TTL are 7200
2. while execute method `test2` and then `test1`, both key TTL are 3600
it only effects last `:` split namespace
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the two methods shown, using the Java 2.6.0 Redis-Lettuce starter and their @Cached annotations. Inspect the Redis TTL after calling test1 then test2, and in the reverse order. Done means the keys for 'def' and 'abc' retain their configured two-hour and one-hour expirations independently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100