#2320 - When I use Redis for L2 cache, can I set the TTL of the cache key?

This commit is contained in:
rbygrave
2021-08-18 08:43:06 +12:00
parent ebadc92f63
commit 7edfe3607d
2 changed files with 31 additions and 12 deletions
@@ -2,12 +2,14 @@ package org.domain;
import io.ebean.annotation.Cache;
import io.ebean.annotation.CacheBeanTuning;
import io.ebean.annotation.Index;
import javax.persistence.Entity;
import java.time.LocalDate;
@Cache(enableQueryCache = true, nearCache = true, naturalKey = "name")
@CacheBeanTuning(maxSecsToLive = 1)
@Entity
public class Person extends EBase {