Skip to content

Allow quick-purge on URL with GET params #759

@braders

Description

@braders

The Fastly admin UI allows for performing a "Quick purge":

Image

The URL entered (in the right to the right of the "Quick purge" button) is purged from the cache.

We recently had a scenario where a specific category facet was returning an old cached page:

https://example.com/category?brand=apple

We tried passing this URL into the quick purge, but it only purged the URL https://example.com/category without the query params. Therefore, the outdated content at https://example.com/category?brand=apple was not removed from the cache. In the end, we ended up having to clear the whole site's page cache, which is not ideal during high traffic periods.

In https://github.com/fastly/fastly-magento2/blob/master/Controller/Adminhtml/FastlyCdn/Purge/Quick.php#L100 we can see that the URL passed in is parsed with Laminas URL factory, and then subsequently recreated without the GET params. I am proposing that the original GET params are retained when performing the purge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions