DEV Community

build996
build996

Posted on

Testing my WordPress fix with ?cb=123 checked the wrong URL

In a September 9 debugging session on my WordPress site, adding a query string made a fix look finished. The page returned by ?cb=12345 was fresh. The same page without that query string still served the old copy.

The distinction mattered because the bare URL was the one readers actually visited.

A fresh response for a different request

That setup had two cache layers: WP Super Cache on the origin and Cloudflare in front of it. In the recorded incident, the query-string request got around the stale copies at both layers. It did not tell me whether either layer had stopped serving the old response for the bare URL.

The successful check established something narrower than I needed: I could retrieve the corrected page through that request path. It did not establish that the normal visitor path returned it.

This describes that site's behavior at the time. Query-string handling depends on cache configuration; adding a parameter is not a universal promise to bypass a cache.

Clearing the origin was only half the repair

The recovery had two separate steps:

  1. Clear the affected page's WP Super Cache files at the origin.
  2. Purge the affected URL from Cloudflare.

The edge TTL in that setup was one day. Clearing only WordPress left Cloudflare able to keep returning the previous response, making a successful origin fix look unsuccessful from outside.

There was also a small operational detail: wp super-cache flush was not registered on that host. The recorded workaround was to remove only the affected page's cache directory, rather than clear every article's cached output.

Those are historical recovery details, not commands to copy blindly into a different installation.

Verify the address readers use

For this failure, the final check needed the bare URL, without an added query string, and a visible detail that distinguished the corrected page from the old one.

A useful verification note would name both requests separately:

  • The query-string request returned the corrected content.
  • The bare URL returned the corrected content after both cache layers were cleared.

The first observation cannot stand in for the second. When a test changes the URL to avoid stale content, it may also avoid the exact failure that still affects readers.

Top comments (1)

Collapse
 
linkbruno profile image
linkbruno.com •

For the bare-URL check, curl -sI is usually enough to see which layer answered: cf-cache-status and age tell you whether Cloudflare served it from the edge, and WP Super Cache leaves a timestamp comment at the bottom of the HTML. One more trap with purge-by-URL is that it matches the exact string, so the trailing-slash version or the www host can keep serving the old copy after you've purged the other one.