mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2320 - When I use Redis for L2 cache, can I set the TTL of the cache key?
This commit is contained in:
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user