jetcache
jetcache copied to clipboard
different method cache key, second method will follow the first method TTL
version : com.alicp.jetcache: jetcache-starter-redis-lettuce: 2.6.0
case
while have 2 method as below:
@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
- while execute method
test1
and thentest2
, both key TTL are 7200 - while execute method
test2
and thentest1
, both key TTL are 3600
it only effects last :
split namespace