- πΊπΈUnited States capellic Austin, Texas
I'd like to see an interface option for dealing with this use case.
BTW, if anybody is looking for a way to do this via Terminus, this will work:
terminus remote:drush SITE.ENV php:eval "pantheon_clear_edge_paths(['path/to/file/filename.pdf']);"
- πΊπΈUnited States darby3
FWIW the terminus command above appears to work for me (thanks, capellic!), while doing a curl request a la
curl https://url.url/path/to/file.txt?parameter=unique
does not. (I get a page not found error, using the latter, which makes sense, but the original file url minus the parameter piece appears to remain cached in the CDN.) Unless I'm formatting the curl request wrong?.. - πΊπΈUnited States nsciacca
FYI - I did something similar in another ticket (3337669) for files that worked nicely using their pantheon_clear_edge_paths function and passing it the file url when the file was updated. In conjunction with the Media Entity File Replace module it seems to work well.
https://www.drupal.org/project/pantheon_advanced_page_cache/issues/3337669 π Not showing newly updated/changed file on Pantheon - Cache issue Needs review
https://git.drupalcode.org/project/pantheon_advanced_page_cache/-/merge_...
- πΊπΈUnited States bburg Washington D.C.
I posted an update in the GitHub issue pointing to the other issue. I think it's still worthwhile to integrate with Purge, as that's the framework for accomplishing cache purges.
I do see some sparse documentation for the pantheon_clear_edge_paths() function here https://docs.pantheon.io/guides/wordpress-configurations/wordpress-cache... and in Pantheon's equivalent WordPress plugin https://github.com/pantheon-systems/pantheon-advanced-page-cache/blob/re... I would prefer using that then doing full CDN clears for obvious reasons.
I'm asking if someone from Pantheon can clarify the status of that function for general use, and also confirm the workflow for contributing to this module, since my GitHub pull request hasn't received any attention for two years, while the GitLab PR in the previously mentioned issue appeared to be merged within a month of being posted. While you are updating that paragraph on the module page, the Pantheon slack also recently consolidated slack channels into their single General channel, no more "Power Users" channel.