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
-
Element Details
-
unit
TimeUnit unitTimeUnit
unit to use.- Returns:
TimeUnit.SECONDS
by default.
- Default:
- SECONDS
-