YotpoLtd / magento2-module-yotpo-reviews

Open Software License 3.0
23 stars 38 forks source link

Save API result with 404 answer to yotpo_rich_snippets cache table. #210

Open sergei-sss opened 4 years ago

sergei-sss commented 4 years ago

Currently only data from answer with status code "200" can be saved in yotpo_rich_snippets table:

                if ($res["status"] != 200) {
                    //product not found or feature disabled.
                    return [];
                }

If you'll save the products without reviews (404 status) in yotpo_rich_snippets table the quantity of API queries can be reduced and using the rich snippets API can be faster.

yotpaul commented 4 years ago

@sergei-sss Thanks for the report! Let me check about this and get back to you.