@EnableCaching @Retention(value=RUNTIME) @Target(value=TYPE) @Import(value=ElastiCacheCachingConfiguration.class) @Deprecated public @interface EnableElastiCache
EnableCaching
with the same configuration
attributes. In contrast to the
EnableCaching
annotation this annotation
does not require a CachingConfigurer
instance, because it is provided by this annotation itself. Therefore users only need
to add this annotation into one configuration file and configure the necessary cache
names.
If there is no
value()
()}
attribute configured, then all caches inside a stack (if the application is running in
one stack) will be used.Modifier and Type | Optional Element and Description |
---|---|
int |
defaultExpiration
Deprecated.
Configures the default expiration time in seconds if there is no custom expiration
time configuration with a
CacheClusterConfig configuration
for the cache. |
AdviceMode |
mode
Deprecated.
Indicate how caching advice should be applied.
|
boolean |
proxyTargetClass
Deprecated.
Indicate whether subclass-based (CGLIB) proxies are to be created as opposed to
standard Java interface-based proxies.
|
CacheClusterConfig[] |
value
Deprecated.
Configures the cache clusters for the caching configuration.
|
public abstract CacheClusterConfig[] value
CacheClusterConfig
configurations
with their physical cache name (as configured in the ElastiCache service) or their
logical cache name if the caches are configured inside a stack and
EnableStackConfiguration
annotation is used inside the application.
The CacheClusterConfig annotation also configures cache specific attributes like
the expiration time.public abstract boolean proxyTargetClass
false
.
Applicable only if mode()
is set to AdviceMode.PROXY
.
Note that setting this attribute to true
will affect all
Spring-managed beans requiring proxying, not just those marked with
@Cacheable
. For example, other beans marked with Spring's
@Transactional
annotation will be upgraded to subclass proxying at the same
time. This approach has no negative impact in practice unless one is explicitly
expecting one type of proxy vs another, e.g. in tests.
public abstract AdviceMode mode
AdviceMode.PROXY
.AdviceMode
public abstract int defaultExpiration
CacheClusterConfig
configuration
for the cache. The expiration time is implementation specific (e.g. Redis or
Memcached) and could therefore differ in the behaviour based on the cache
implementation.Copyright © 2022 Pivotal Software, Inc.. All rights reserved.