BobRay / RefreshCache

Refreshes each page in the site cache by requesting it with cURL
https://bobsguides.com/refreshcache-tutorial
5 stars 1 forks source link

Not working as before #3

Open ysanmiguel opened 5 years ago

ysanmiguel commented 5 years ago

Hello Bob. I just found that this new version is not working well on my websites that are using complex MIGX tables and takes some time building the cache. The old versions takes longer processing but works fine creating the complete cache for every page, this new one is completing the task lot faster but is not doing the right job, the pages are taking longer to open like the cache wasn't build at all after run the refreshCache.

here the error log, looks like is doing one per page:

[2019-02-25 12:25:51] (ERROR @ /home/userDir/public_html/core/components/refreshcache/processors/refresh.class.php : 50) Exception: Client error: `HEAD https://url.com/page1.html` resulted in a `404 Not Found` response
[2019-02-25 12:25:53] (ERROR @ /home/userDir/public_html/core/components/refreshcache/processors/refresh.class.php : 50) Exception: Client error: `HEAD https://url.com/page2.html` resulted in a `404 Not Found` response
[2019-02-25 12:25:54] (ERROR @ /home/userDir/public_html/core/components/refreshcache/processors/refresh.class.php : 50) Exception: Client error: `HEAD https://url.com/page3.html` resulted in a `404 Not Found` response
[2019-02-25 12:25:56] (ERROR @ /home/userDir/public_html/core/components/refreshcache/processors/refresh.class.php : 50) Exception: Client error: `HEAD https://url.com/page4.html` resulted in a `404 Not Found` response
[2019-02-25 12:25:57] (ERROR @ /home/userDir/public_html/core/components/refreshcache/processors/refresh.class.php : 50) Exception: Client error: `HEAD https://url.com/page5.html` resulted in a `404 Not Found` response
[2019-02-25 12:25:59] (ERROR @ /home/userDir/public_html/core/components/refreshcache/processors/refresh.class.php : 50) Exception: Client error: `HEAD https://url.com/page6.html` resulted in a `404 Not Found` response
[2019-02-25 12:26:01] (ERROR @ /home/userDir/public_html/core/components/refreshcache/processors/refresh.class.php : 50) Exception: Client error: `HEAD https://url.com/page7.html` resulted in a `404 Not Found` response

I don't understand why the HEAD and the 404 errors... can you please guide me? Thanks!!!

BobRay commented 5 years ago

If those resources are protected in any way, RefreshCache can't visit them and they won't be refreshed because, as a manager user, you're not logged in to the front end. I think this would have been true of the previous version as well, it just wouldn't have shown the error messages.

Try visiting the Login page in the front-end from the Manager. Log in as yourself there before running RefreshCache.

Remember, too, that RC skips unpublished, uncacheable, and deleted resources.