spring-cloud/spring-cloud-gateway

Add customization options to ResponseCacheGatewayFilter

Aberta

#3.429 aberto em 12 de jun. de 2024

 (1 comentário) (1 reação) (0 responsável)Java (3.204 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (4.284 estrelas)
Métricas de merge de PR
 (Mesclagem média 1d 21h) (18 fundiu PRs em 30d)

Description

Is your feature request related to a problem? Please describe. I have a specfic kind of caching logic that should not use the header values. In the current implementation of the CacheKeyGenerator there is a static list of key generators that I cannot modify.

Describe the solution you'd like Add an api or spring mechanism to change the key generator.

Describe alternatives you've considered I tried to modify that static field at runtime but this approach is really hacky.

Additional context I have not used spring for a long time. Maybe there is already a way to change the CacheKeyGenerator or ResponseCache implementation.

Guia do colaborador