keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

Change to clear_home() so that it unlinks any files matching the glob "index*html*" #64

Closed picasticks closed 4 years ago

picasticks commented 4 years ago

The idea is to only unlink files that exist instead of trying to @unlink FILE_HTML, FILE_GZIP, FILE_WEBP_HTML, FILE_WEBP_GZIP whether they exist or not.

This also solves the problem that I was originally trying to address in pull request #62. (I'm doing brotli compression of the static cache files.)

svenba commented 4 years ago

The time for Brotli will come but having this changed where 99% isn't requiring it isn't an option at the moment.