Annotation Interface TimeToLive
TimeToLive marks a single numeric property on aggregate root to be used for setting expirations in Redis. The
annotated property supersedes any other timeout configuration.
@RedisHash
class Person {
@Id String id;
String name;
@TimeToLive Long timeout;
}
- Since:
- 1.7
- Author:
- Christoph Strobl
-
Optional Element Summary
Optional Elements
-
Element Details
-
unit
TimeUnit unitTimeUnitunit to use.- Returns:
TimeUnit.SECONDSby default.
- Default:
- SECONDS
-