Actually, in my case, there was some custom code in the functions.php that was caching the woocommerce endpoints(for products, orders, users). I had to remove that to make it work.
And what I understood was that these woocommerce endpoints were already cached by default by the plugin(after reading the FAQ section on the plugin page). So the custom code in functions.php was extra and causing issues and I just removed that custom code.
Hope this helps.