Fastly Purge by URLs

Created on 4 April 2024, 9 months ago
Updated 15 May 2024, 8 months ago

Problem/Motivation

We get requests every once in awhile to "Purge specific URLs from Fastly". I would love to add some simple feature for this to the admin side and allow for a CMS user to do this functionality without access to the Fastly Admin

Proposed resolution

I created a patch to add the feature to the Fastly Module:

  • Admin page where CMS user can submit a URL to be purged.
  • A single permission to allow a user role to either view this admin page, or see the form item on an existing form.
  • The actual submit function just needs to run as tge command:
    "\Drupal::service('fastly.api')->purgeUrl('$urlToBePurged');"

In the form class, dependency injection is used:

$this->api->purgeUrl(trim($url))

User interface changes

It is creating a New tab

API changes

No

Data model changes

No

Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

🇻🇪Venezuela zahord

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024