pingora icon indicating copy to clipboard operation
pingora copied to clipboard

Is it possible to cache based on request body?

Open KaiserKarel opened this issue 1 year ago • 3 comments

Ideally I'd like to first receive the request body and use that to generate the CacheKey. Is this currently possible without forking Pingora? I wonder if it fits in the current lifecycle management.

KaiserKarel avatar Nov 14 '24 18:11 KaiserKarel

Interested in that too. For transparent caching of graphql requests. Latency would go up due to buffering for sure.

Object905 avatar Nov 14 '24 19:11 Object905

Interested in that too. For transparent caching of graphql requests. Latency would go up due to buffering for sure.

Similar situation for me, except caching JSON-RPC.

KaiserKarel avatar Nov 15 '24 06:11 KaiserKarel

@johnhurt @gumpt how would we like this feature to be added? Reuse the ProxyHttp trait, and add another service which has a different lifecycle?

Another usecase we have is that some upstreams support additional methods (JSON-RPC), so we'd like to determine the upstream based on the request body too.

KaiserKarel avatar Nov 22 '24 15:11 KaiserKarel