Allow altering URL/s to be flushed

Created on 15 May 2023, over 1 year ago

Problem/Motivation

I needed to be able to trigger flushing other URLs when a given node was flushed for a client project - they needed optional extra URLs to share different images related to a node (which redirect to the target node). Not sure what FB does re: caching for URLs with query strings but perhaps that could also be a potential use case to add a query string to the URL.

Proposed resolution

The attached patch adds a hook_facebook_flush_cache_url_alter() which passes the url and nid as arguments. It allows converting $url to an array, where multiple URLs should be flushed for the given node.

NB this patch is rolled after application of the patch in https://www.drupal.org/project/flush_facebook_cache/issues/3360304 🐛 Use messenger method not property (not set) Needs review to fix the error re: null messenger property.

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇨🇦Canada bgilhome Victoria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024