Hey @yevgen ,
Thanks for the response!
My site is r-bloggers.com
I use feedwordpress to fetch posts from an RSS feed and publish them. This worked fine to refresh the homepage, but somehow stopped working some weeks ago. I’ve since moved the site to a new server with php 7.2, updated the plugin to 4.4.0 - but still it didn’t work.
Also when I use the “quick edit” to change the publication time of the post, doesn’t refresh the cache of the homepage (and I’ve checked it using incognito mode).
I’ve looked at the APO plugin. I see that the purging functions are initiated here:
And specifically, the interesting function is purgeCacheByRelevantURLs. Which is initiated in line 109 here:
Now the question is why did this stop working for me. There are several options:
- that somehow purgeCacheByRelevantURLs doesn’t work properly
- that it’s not initiated properly
- that the action I’m using somehow are not registered in transition_post_status properly
If I’m to guess, I’d go with option 2. But it’s hard for me to know.
A simple way to help me find out is if you would do some of the following:
create a dedicated function to purge the homepage and the paginated pages (something similar to cloudflare_purge_by_url, could be called cloudflare_purge_homepage), and make it easily called externally (instead of the current init that is needed to the hook class).
This would allow me to run something like:
This would allow me to play with the priority (I see it’s currently set to 3, maybe if I try 1 or 1/10, it would work). Alternatively, I could make the action happen every X minutes, which would give me another way to solve the problem for myself.
you can also expose a cloudflare_purge_by_url function, and I could use it to enter the homepage, and see if that works.
You can also add an argument to control the action priority (currently it’s 3, and I’m guessing making it a smaller or larger number might solve the problem. But who knows.
is there any debug log I can use? (I see that there is a debug call inside the plugin, but I don’t see where I can see it’s log)
What do you think?
(also feel free to contact me via email around this: [email protected])