APO + Custom Cache Key on Query Params

Based on the APO Documentation on query params, my understanding is that it is not possible to specify query strings on which to segment the cache when APO is enabled. I have a use case where if the query param “?noheaders=1” is specified, I don’t want to display certain elements on the page (vs when the query string is not included).

If I set my cache to “Cache Everything” in a page rule for a given path, I see the expected results in the browser, I am not certain whether the page is being returned from cache ( it’s not from tcache) based on these response headers I see in my Developer console:

cf-apo-via: origin,miss
cf-cache-status: HIT
cf-edge-cache: cache,platform=wordpress

It seems strange that with APO, I am able to segment cache via page rule custom cache key based on cookies but not on query strings.

@yevgen can you advise?

APO doesn’t support Custom Cache Key on Query Params. APO will bypass caching for ?noheaders=1 as it is not in the list of supported QS to return from cache. APO only support custom cache key for Cache By Device Type.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.