Build cache after creating variations
-
Hi there,
I’ve written a plugin which automatically creates variations for variable products. There are a vast amount of variations (3000 – 4000 per product) and WooCommerce handles it very well.
But after creating or updating those variants, calling the product list in backend takes very long. In my opinion that’s because on saving the variant the transients get deleted and on calling the product list calculating the min and max prices takes so long.
Is my assumption correct? And is there a proper way building that cache programmatically? As the creation of the variants takes some time (about 2 hours, they are built in blocks of 10 via asynchronous Ajax calls), there would be also time enough to rebuild the transients.
Would it be enough to loop over all products and call get_variation_prices?
Thanks for pushing me in the right direction.
Regards,
Marcus
The topic ‘Build cache after creating variations’ is closed to new replies.