Class ResponseCacheGatewayFilter
java.lang.Object
org.springframework.cloud.gateway.filter.factory.cache.ResponseCacheGatewayFilter
- All Implemented Interfaces:
GatewayFilter, ShortcutConfigurable, org.springframework.core.Ordered
public class ResponseCacheGatewayFilter
extends Object
implements GatewayFilter, org.springframework.core.Ordered
LocalResponseCache Gateway Filter that stores HTTP Responses in a cache, so
latency and upstream overhead is reduced.
- Author:
- Marta Medio, Ignacio Lozano
-
Nested Class Summary
Nested classes/interfaces inherited from interface ShortcutConfigurable
ShortcutConfigurable.GatewayBeanFactoryResolver, ShortcutConfigurable.GatewayEvaluationContext, ShortcutConfigurable.RestrictivePropertyAccessor, ShortcutConfigurable.ShortcutType -
Field Summary
Fields inherited from interface GatewayFilter
NAME_KEY, VALUE_KEYFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain) Process the Web request and (optionally) delegate to the nextWebFilterthrough the givenGatewayFilterChain.intgetOrder()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ShortcutConfigurable
shortcutFieldOrder, shortcutFieldPrefix, shortcutType
-
Constructor Details
-
ResponseCacheGatewayFilter
-
-
Method Details
-
filter
public reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain) Description copied from interface:GatewayFilterProcess the Web request and (optionally) delegate to the nextWebFilterthrough the givenGatewayFilterChain.- Specified by:
filterin interfaceGatewayFilter- Parameters:
exchange- the current server exchangechain- provides a way to delegate to the next filter- Returns:
Mono<Void>to indicate when request processing is complete
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-