Class LocalResponseCacheGatewayFilterFactory
java.lang.Object
org.springframework.cloud.gateway.support.AbstractConfigurable<LocalResponseCacheGatewayFilterFactory.RouteCacheConfiguration>
org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory<LocalResponseCacheGatewayFilterFactory.RouteCacheConfiguration>
org.springframework.cloud.gateway.filter.factory.cache.LocalResponseCacheGatewayFilterFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware, GatewayFilterFactory<LocalResponseCacheGatewayFilterFactory.RouteCacheConfiguration>, Configurable<LocalResponseCacheGatewayFilterFactory.RouteCacheConfiguration>, ShortcutConfigurable, org.springframework.context.ApplicationEventPublisherAware
@ConditionalOnProperty(value="spring.cloud.gateway.server.webflux.filter.local-response-cache.enabled",
havingValue="true")
public class LocalResponseCacheGatewayFilterFactory
extends AbstractGatewayFilterFactory<LocalResponseCacheGatewayFilterFactory.RouteCacheConfiguration>
GatewayFilterFactory of
ResponseCacheGatewayFilter. By default, a global cache (defined as properties
in the application) is used. For specific route configuration, parameters can be added
following LocalResponseCacheGatewayFilterFactory.RouteCacheConfiguration class.- Author:
- Marta Medio, Ignacio Lozano
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class AbstractGatewayFilterFactory
AbstractGatewayFilterFactory.NameConfigNested classes/interfaces inherited from interface ShortcutConfigurable
ShortcutConfigurable.GatewayBeanFactoryResolver, ShortcutConfigurable.GatewayEvaluationContext, ShortcutConfigurable.RestrictivePropertyAccessor, ShortcutConfigurable.ShortcutType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringExchange attribute name to track if the request has been already process by cache at route filter level.Fields inherited from interface GatewayFilterFactory
NAME_KEY, VALUE_KEY -
Constructor Summary
ConstructorsConstructorDescriptionLocalResponseCacheGatewayFilterFactory(ResponseCacheManagerFactory cacheManagerFactory, Duration defaultTimeToLive, org.springframework.util.unit.DataSize defaultSize, LocalResponseCacheProperties.RequestOptions requestOptions) LocalResponseCacheGatewayFilterFactory(ResponseCacheManagerFactory cacheManagerFactory, Duration defaultTimeToLive, org.springframework.util.unit.DataSize defaultSize, LocalResponseCacheProperties.RequestOptions requestOptions, org.springframework.cache.caffeine.CaffeineCacheManager caffeineCacheManager) -
Method Summary
Modifier and TypeMethodDescriptionReturns hints about the number of args and the order for shortcut parsing.Methods inherited from class AbstractGatewayFilterFactory
enableBodyCaching, getPublisher, setApplicationEventPublisherMethods inherited from class AbstractConfigurable
getConfigClass, newConfig, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface GatewayFilterFactory
apply, apply, apply, getConfigClass, name, newConfigMethods inherited from interface ShortcutConfigurable
shortcutFieldPrefix, shortcutType
-
Field Details
-
LOCAL_RESPONSE_CACHE_FILTER_APPLIED
Exchange attribute name to track if the request has been already process by cache at route filter level.- See Also:
-
-
Constructor Details
-
LocalResponseCacheGatewayFilterFactory
public LocalResponseCacheGatewayFilterFactory(ResponseCacheManagerFactory cacheManagerFactory, Duration defaultTimeToLive, org.springframework.util.unit.DataSize defaultSize, LocalResponseCacheProperties.RequestOptions requestOptions) -
LocalResponseCacheGatewayFilterFactory
public LocalResponseCacheGatewayFilterFactory(ResponseCacheManagerFactory cacheManagerFactory, Duration defaultTimeToLive, org.springframework.util.unit.DataSize defaultSize, LocalResponseCacheProperties.RequestOptions requestOptions, org.springframework.cache.caffeine.CaffeineCacheManager caffeineCacheManager)
-
-
Method Details
-
apply
-
shortcutFieldOrder
Description copied from interface:ShortcutConfigurableReturns hints about the number of args and the order for shortcut parsing.- Returns:
- the list of hints
-