Class AbstractRedisCacheConfiguration
java.lang.Object
io.micronaut.configuration.lettuce.cache.AbstractRedisCacheConfiguration
- Direct Known Subclasses:
DefaultRedisCacheConfiguration
,RedisCacheConfiguration
Allows configuration of caches stored in Redis.
- Since:
- 1.3
- Author:
- Graeme Rocher, Alex Katlein
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractRedisCacheConfiguration
(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionSpecifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last read.TheObjectSerializer
to use for serializing keys.void
setCharset
(Charset charset) void
setExpirationAfterWritePolicy
(String expirationAfterWritePolicy) void
setExpireAfterAccess
(Duration expireAfterAccess) void
setExpireAfterWrite
(Duration expireAfterWrite)
-
Field Details
-
server
-
keySerializer
-
valueSerializer
-
charset
-
expireAfterWrite
-
expireAfterAccess
-
expirationAfterWritePolicy
-
-
Constructor Details
-
AbstractRedisCacheConfiguration
public AbstractRedisCacheConfiguration(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) Constructor.- Parameters:
applicationConfiguration
- applicationConfiguration
-
-
Method Details
-
getServer
- Returns:
- The name of the server to use.
- See Also:
-
getValueSerializer
- Returns:
- The
ObjectSerializer
type to use for serializing values.
-
getKeySerializer
TheObjectSerializer
to use for serializing keys. Defaults toDefaultStringKeySerializer
.- Returns:
- The optional
ObjectSerializer
class
-
getExpireAfterWrite
- Returns:
- The expiry to use after the value is written
-
getExpireAfterAccess
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last read.- Returns:
- The
Duration
-
getExpirationAfterWritePolicy
- Returns:
- The class path for an implementation of ExpirationAfterWritePolicy
-
getCharset
- Returns:
- The charset used to serialize and deserialize values
-
setExpireAfterWrite
- Parameters:
expireAfterWrite
- The cache expiration duration after writing into it.
-
setExpireAfterAccess
- Parameters:
expireAfterAccess
- The cache expiration duration after accessing it
-
setCharset
- Parameters:
charset
- The charset used to serialize and deserialize values
-
setExpirationAfterWritePolicy
- Parameters:
expirationAfterWritePolicy
- The class path for an implementation of ExpirationAfterWritePolicy
-