Hi,
I’m afraid you haven’t had luck in implementing them correctly. You can use Cache Rules (beta) to specify which URLs to cache based on multiple parameters, including query string and even cookies.
However, I must say that, to the best of my knowledge, Cache Rules or Page Rules cache will differ from APO cache, and my understanding is that if you use a Cache Rule in combination with APO, for the URLs where a Cache Rule is triggered, you’ll have cache based on the regular Cloudflare caching mechanism, that is, pages are cached at the colocation where first request was received, while APO uses KV to store the cached page across every colocation. Still, it will be a much better situation than having a request sent to your origin each time.
With that caveat in mind (I hope Cloudflare staff from the APO Team can confirm or deny my working hypothesis here), you can create the following Cache Rule for your APO-enabled host:
When incoming requests match:
(http.host eq "APO-ENABLED-DOMAIN-NAME" and http.request.uri.query contains "currency")
(The hostname part is only needed if your zone has subdomains that you do not want to be affected by this rule, such as staging, for instance) Then your URLs like example.com/?currency=usd...
will be cached separately from example.com/?currency=eur
etc.
If you check their headers, you’ll see that APO is not caching them, but you’ll have a HIT nevertheless:

Please review the following documentation about how to implement Cache Keys on an Enterprise Plan. It indicates that you can, in fact, not only decide what to cache or not to cache, but create distinct cached versions of the same URL based on parameters like cookie, header, query string etc.
There are a couple of common reasons to change the Cache Key Template. You might change the Cache Key Template to:
- Fragment the cache so one URL is stored in multiple files. For example, to store different files based on a specific query string in the URL.