I have code which imports an xml feed in opencart. I can clear the cache before import, but after I would like to recreate the cache for product pages.
I saw catalog/product/getProducts uses
$this->cache->set('product.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . (int)$customer_group_id . '.' . $cache, $product_data);
but I could not find something similar for individual product pages which looks like is cached with
$this->response->setOutput($this->render());
Is there anyway to generate and cache product pages inside a product data loop? If I cannot code it, I was thinking of just setting $_GET and calling index.php or using curl although I would like to avoid the bandwidth.
Trying to include the site root’s index.php via require led to function redeclare issues. Trying to dispatch a new action via a new front led to issues with calling catalog actions inside the admin.
What I ended up doing was a curl call to local host.