spring-cloud/spring-cloud-gateway

Add customization options to ResponseCacheGatewayFilter

Open

Aperta il 12 giu 2024

Vedi su GitHub
 (1 commento) (1 reazione) (0 assegnatari)Java (4284 star) (3204 fork)batch import
enhancementhelp wanted

Descrizione

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.

Guida contributor