Skip to content

Caching of query parameters

When receiving a request for a URL, the page cache considers the entirety of the URL, including GET parameters. As a result, the page cache will identify as different from and cache each variant separately. This caching behavior provides a more scalable method for serving variations of a page to specific user groups.

Because each variant of a URL’s GET parameters are cached separately, an increase in the number of variants for a URL can have performance implications for a site, particularly during a high traffic event. The first request for each variant will bypass cache and will result in SQL queries on the origin server. A large volume of direct SQL queries can overload the primary database and lead to an increase in responses with a 503 HTTP status code.

  • Avoid using very explicit times (e.g., specifying minutes or seconds) in query parameters. Instead, round the dates and times up to the closest day, hour, or minute.
  • Avoid creating email campaigns that generate a wide variety of query parameter variants. Reduce the number of variants wherever possible.

Filtered query parameter values

The values of a specific set of GET parameters in a request URL are filtered and are therefore not cached as variants.

Values for these query parameters are filtered by the page cache:
_, hpt, eref, iref, fbid, fb_xd_bust, fb_xd_fragment, npt, iid, icid, ncid, snapid, fb_ref, fb_source, omcamp, affiliate, migAgencyId, migSource, migTrackDataExt, migRandom, gclid, migTrackFmtExt, linkId, _ga, hootPostID, pretty, gref, __lsa, ia_share_url, fbclid, mod, wsrlui

If any of the query parameters listed above are included in a request for a URL, the query parameters will be cached but their values will be ignored. The page cache will check all other query parameters and values in the URL before potentially passing the request to the origin server.

For example:

  • The page cache receives an incoming request for If there is no cached response for, then the full request is passed to the origin web server. The response from origin is then cached at the edge with the key, and will be served to later requests for and
  • is rewritten as
  • Query strings with a value and no name, such as are also filtered to reflect

Purging a URL from the page cache

When purging a URL from the page cache, all variants of the URL’s GET parameters will also be purged.

Last updated: May 17, 2024

Relevant to

  • Node.js
  • WordPress