@Retention(value=RUNTIME) @Documented @Target(value={FIELD,METHOD}) public @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;
}
public abstract TimeUnit unit
TimeUnit unit to use.TimeUnit.SECONDS by default.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.