IcecatNV / magento-extension

MIT License
2 stars 9 forks source link

UserType is not cached #9

Open MennoTammens opened 12 months ago

MennoTammens commented 12 months ago

In the function updateProductWithIceCatResponse a call is made to getUserType, which makes to API calls to Icecat to find the userType ('open' of 'full'): https://github.com/IcecatNV/magento-extension/blob/main/Model/IceCatUpdateProduct.php#L101 https://github.com/IcecatNV/magento-extension/blob/main/Helper/Data.php#L409

This function is called in this foreach loop: https://github.com/IcecatNV/magento-extension/blob/main/Model/Queue.php#L431

This means that for every product in each cron job 2 unnecessary API calls are made, because userType will not change during the cron job.