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

Add cleaner class for third party plugins compatibility #36

Closed auban closed 4 years ago

svenba commented 6 years ago

@auban please revert the spaces to tabs changes and resolve the conflicts. After that we will review the pull request. Thanks.

auban commented 6 years ago

The conflict is resolved. Thanks

dramaturg commented 6 years ago

@auban we started go go through all the changes you made. Thank you for all the work you have put into this so far!

Some issues still need to be resolved though:

dramaturg commented 5 years ago

@auban, trying to limit the cache cleared to an edited post results in the full cache being cleared. This is regardless of the option "Clear the home page cache on post edit" being ticked or whether there are any additional post IDs being specified. It also looks like the home page cache clearing is always being triggered.

The first issue is probably because you removed clear_home* related functionality but the new implementation doesn't work correctly. and proceed to recursively clear the cache in any situation.

Could you check that out?

auban commented 5 years ago

Hello,

Your repo is not correctly merged.

I have change the home_url() to home_url('/').

home_url() = not end trailling slash so my new implementation of _clear_dir do a clean directory home_url('/') = with end trailling slash so clean only file in directory.

Check your repo diff with this merge request.

Regards, Auban

dramaturg commented 5 years ago

@auban, I've re-tested your code from earlier today and still see the full cache being deleted on post edit - again regardless of the exact settings used. (In both instances I tested the master branch from RedCastor/cache-enabler)