Cache by query string

Hello guys!

How I can do to cache a route based by route + query string? I don’t see anything about this in doc.

I need cache route like mydomain.com/feed?page=1&pageSize=20

Hello @mpaegle and welcome to the community.

If my memory serves me right, Tyk should cache query params by default. I assume this is a get request, so have you tried enabling cache_all_safe_requests?

Hello @Olu tks for reply… yes, cache_all_safe_requests is enable

That’s good to know. Does it work as expected?

No, I’m still having a high number of request in the service

works here, thks @Olu

I was going to ask to check if enable_cache was set to true and also increase the cache_timeout to something larger.

However, I see you have gotten it to work. As a test, you can verify if a request is being cached from the response header. You should see something like X-Tyk-Cached-Response for a cached request.