With this setup I thought the categories part of my query would get cached for one day, but that the product part would never be cached. What I’m seeing though is that the whole query is cached for a full day. Is this the expected behavior? If so, how can I make it work like I thought it would?
And going by the comment there is seems like as long as a query contains one of the configured query names the full query will be cached. So, in my case, because my query contains categories the whole thing is cached for a day. Which is a bit of a bummer, because individual products are much more likely to be updated (price change etc) than a full category is added/edited/removed.
So I guess this is the expected behavior. Question still remains though how to work around it.
The thing is, remember this is a “Response” cache – it caches the entire document that is returned.
So, if the response has category and product data in it – and one item in that large document changes – then that entire document is purged/invalidated when any product or any category in that doc changes.