Class ConstantExpirationAfterWritePolicy
java.lang.Object
io.micronaut.configuration.lettuce.cache.expiration.ConstantExpirationAfterWritePolicy
- All Implemented Interfaces:
ExpirationAfterWritePolicy
public class ConstantExpirationAfterWritePolicy
extends Object
implements ExpirationAfterWritePolicy
Provides a Cache TTL policy of constant time.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ConstantExpirationAfterWritePolicy
public ConstantExpirationAfterWritePolicy(long ttl) - Parameters:
ttl
- ttl in milliseconds
-
-
Method Details
-
getExpirationAfterWrite
- Specified by:
getExpirationAfterWrite
in interfaceExpirationAfterWritePolicy
- Parameters:
value
- Object that will be put in the cache (non-serialized)- Returns:
- TTL of the document in Redis in milliseconds
-