MPG Pro Generated Pages Not Caching
-
We use https://themeisle.com/plugins/multi-pages-generator/ on our site. I am trying to configure W3T Cache so we can switch to using your plugin, but am running into an issue where any page that is created by the MPG Pro plugin is not cached. If I clear cache, open an incognito tab, visit one of the MPG Pro generated pages and then check the cache folder, I see the page name folder created, but it is always empty.
-
Hello @themassapothecary
Thank you for reaching out, and I am happy to help!
To be honest, I do not have any experience with MPG Pro Generated Pages. Is there any chance that you can share the URL of the page so I can check this?
Have you tried using another browser instead of incognito mode to load the page?Thanks!
@vmarko thank you. I fixed the caching issue. However, there is another issue where the cache is being deleted every 12-24 hours. I have:
Maximum lifetime of cache objects: is 2592000 seconds
Garbage collection interval: is 2592000 seconds
Object and database cache are confirmed disabled but i still set their lifetime cache of objects and garbage collection intervals to 2592000 seconds.
Under auto purge pages i have all unchecked
I have checked cron jobs and there are no cron jobs from w3tc clesring the cavhe.
I did have preload cache enabled but tried disabling to see if that could cause cache to be cleared and it still was cleared.
it has to be happening from a function being called by w3tc. How do I stop this and make it so cache is only cleared when I manually clear it?
could updating a woocommerce product cause all the cache to be deleted?
@vmarko i confirmed that updating product pages clears all cached files, not just the product pages cache. How do I stop this?
Separately, is there a way to add two sitemaps to preload instead of only 1?Hello @themassapothecary
Thank you for your feedback.
Yes, some plugins ar calling flus_all and therefore cleares the entire cache
There is no way around it within the W3TC as the other plugins or themes are using filters to call thisYou can however add filter for this, so pelase make sure to check this gist file
As for the sitemap, You have to supply the main sitemap, which could be an index too. The plugin will look for
<sitemap>, which specifies another sitemap URL, and parse that URL as a sitemap too. So “nested” sitemaps are no problem.I hope this helps!
Thanks!
@vmarko thank you. I will look into that code abd am already working on a custom script as well. However, it seems odd that other themes/plugins would call w3tc functions without even knowing if it’s installed. Why would a plugin for example, add. Ode to do that when maybe someone uses one of the other 100 cache plugins instead?
Sitemap. Thank you. I am aware of this. I still need to be able to add 2 sitemaps so original question still stands, please.
@vmarko ok, so i added the snippet you shared from the gist file. The cache is still being cleared somehow. Last night I checked and there was almost 3000 cached pages. Now there is only 623. No one has logged into the site and mo api updates sent to update product stock or anything similar. Why is the cache being auto cleared?
Hello @themassapothecary
Thank you for your feedback.
it seems odd that other themes/plugins would call w3tc functions without even knowing if it’s installed. Why would a plugin for example, add. Ode to do that when maybe someone uses one of the other 100 cache plugins instead?
This is how themes and plugins are making sure that when making updates on their end, the cache is cleared. And since they cannot know which caching plugin is used, they need to make sure that the most used optimization solution which is W3 Total Cache, is compatible and the cache is cleared.
This being said, flush_all is not the best way to do this, as they can use flush_url, flush_post; however, they are using flush_all, which triggers all caches to be cleared.Do you have the option to check the Purge log in Performance>General settings>Debug section?
Purge Logs provide information on when your cache has been purged and what triggered it. Sometimes, you’ll encounter a complex issue involving your cache being purged for an unknown reason. The Purge Logs functionality can help you easily resolve those issues.
As for the sitemaps, only one sitemap can be added, so there is no option to use more than one, this is why I mentioned that you can use nested sitemaps or create a custom sitemap.
For cache preload, only a single sitemap can be usedLet me know if this helps!
Thanks!
The topic ‘MPG Pro Generated Pages Not Caching’ is closed to new replies.