Automate Caching Every 3 to 5 Minutes

We have a client that has a WooCommerce store that’s also connected to a 3rd party company using REST API. The calls are every 10 minutes, but inventory on a PDP isn’t updating fast enough. So I’m wondering, is there a way to add an expiry time to clear cache ONLY on PDPs every 3 to 5 minutes so that the inventory count is accurate and not delayed.

The reason is is that some customers are able to checkout with products that are out of stock causing a major issue.

Thanks in advance

In this case, since your stock information is dynamic (updating every 3-5 minutes), we would not suggest you to cache it on Cloudflare. Rather than that, you should bypass it.

However, if you want to cache it on Cloudflare, you can create a Cache Rules with Edge Cache TTL & Browser Cache TTL is 5 minutes.

Thank you. I aiready ended up doing that last week already since no one responded. It didn’t fix the issue though.