Purge is incomplete because of current suffix strategy

Created on 27 November 2022, about 2 years ago
Updated 28 May 2023, over 1 year ago

Problem/Motivation

While working on 📌 Manage CacheGenerate and CachePurge via services, add web auth credentials, improve cache warming, phpcs and drush commands Fixed I recognized that the file ".html" (for front page) and others if paths ends with "/" cannot be removed by current purge process. The reason is, that files are searched via "FileSystem::doScanDirectory" where "."-files are ignored.

Steps to reproduce

Activate boost and visit at leas front page and one other path with guest user.
Check cache folder (default: "/sites/default/files/boost" after purging for existing ".html".

Proposed resolution

Because direct file handling with PHP isn't easy and with using functionality of the operating system can rise compatibility problems. On the other side it's easy to avoid "."-files with adding for example an underscore which ends up for example in "_.html". I remember that this is also in D7 version good solution but can there be changed by user as far as I remember.

Remaining tasks

-

User interface changes

-

API changes

Adding the underscore will rise need of updating existing webserver configurations (redirect settings). So I like to discuss this solution. And maybe somebody has a better idea but please with a proof of concept code proposal for a better search on files with ".".

Data model changes

-

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany c-logemann Frankfurt/M, Germany

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024