It seems as if the w3t plugin is purging the api cache every time I update a product. This causes a 10 second lag for each api call to all categories the first time it is called after any product is updated, added, deleted etc. How can I remove the functionality that purges the api cache or, how can I rebuild the cache after each update (before a user has to click and wait for the first response)?
I am sorry about the issue you are experiencing and I’m happy to assist you with this.
We’ve also received the email via the support channel, and I asked you some follow-up questions. We can continue the correspondence there since you are a Pro user.
IS REST API cache enabled in Perfomrance>Page Cache>REST API?
I can see that you’ve set up Full site delivery, however, you are also using the CDN with the URL rewrite, so in this case, you should disable the CDN in Performance>General settings and only use FSD CDN.
The pages are cached once visited. So if you wish to preload the pages you can use Cache Preload in Performance>Page cache and Automatically prime the page cache. There you will also see the option Preload the post cache upon publish events which does exactly that. since the Cache Preload is triggered by the page view and sometimes wp cron is not very reliable, I would advise using the default settings in Cache Preload and possibly set a custom cronjob for page visit on your server, for example, every 5-10 mins or better yet use wp-cli.
Logging is available in wp cli so instead of calling wp cron via crontab – you should call it directly via wp w3-total-cache pgcache_prime
and track the output which pages / sitemap positions are primed by script.
Viewing 2 posts - 1 through 2 (of 2 total)
The topic ‘api purge after product update’ is closed to new replies.