Cache not purging with transform rule enabled

Hi community!

I’ve been using Cloudflare’s cache and purge API for a while and after making some changes to a transform rule I’m not being able to purge this URL cache.

Before, the endpoint was something like this: https://domain.com/info?id=xx-xx
And cache purging worked fine!

Then, we had to add the language to this endpoint using a transform rule that would use http.request.accepted_languages[0] to transform that same URL to : https://domain.com/info?id=xx-xx&lang=yy-yy and that is when cache purge stopped working.

What we have tried:

  • Cleaning the same URL that our server would receive (https://domain.com/info?id=12-34&lang=en-US)
  • Cleaning the URL that the client calls (https://domain.com/info?id=xx-xx)
  • Adding a Transform rule to remove origin from calls (cache is being cleaned like
    { "files": [ { "url": "https://domain.com/info?id=xx-xx" }, { "url": "https://domain.com/info?id=xx-xx&lang=yy-yy" } })
  • Changing the transform rule to use this path: https://domain.com/info/lang/yy-yy?id=xx-xx (Since it worked before we had two parameters on query string)
  • Removing the Transform Rule that adds the language to the URL makes it work again

We are really out of ideas here, do you know something we could try?

I tested some more, and it looks like the problem is really our transform rule.

We tried calling our endpoints directly from client with https://domain.com/info?id=xx-xx&lang=yy-yy and all the tests worked, caching and purging…

So it means that the Transform Rule is caching my call under some key other than the URL that gets to my server and the one my client calls. Do you guys know anything about this?