• Hi,
    I’m using both amazon-grid and amazonproducts shortcodes, and it seems that randomly, sometimes the products are just not showing on my page. I clear the product cache and it kinda works better, but my question is, how can I not depend on purging the cache? I’m afraid the visitors are not seeing the products and therefore losing sales. How can I fix this?

    Thank you,
    kind regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @desiwp,
    The first thing you need to check is that you have cache ahead enabled in the settings.

    You may also want to set the cache length time to more than an hour (like say 4 hours – or 14400 seconds). Both settings are in the Plugin settings on the Advanced Settings tab.

    This will usually stop the problems when the cache ahead option was off. The main reason for this is that without cache ahead, the plugin will cache items as they are called. This means if you have a shortcode with 5 products on a page and further down the page you have one with 2 products and another with 4 products, the plugin will do the API call when it gets to the shortcode and cache only those that are not cached at that time when the call is made. So you could have calls happening too quickly and Amazon is throttling the requests. This will cause the product not to display (no data is returned, so no product). This is even more evident when you have a product on more than one page or in a post list page. Then when the full page is loaded some calls have to be remade off cycle.

    Remember to clear the entire cache again after changing the plugin cache settings as well.

    When you use the Cache Ahead option, the plugin looks at the entire page/post content or list post/post loop content that will be displayed. It then bulk-caches all the products in groups of 10 (Amazon’s request limit per API call) and then everything is cached at the same cache interval cycle. That makes the pages load quicker (no additional calls to make) an the products should all be displayed from the same cached response (less cache items to cycle through with only one database call).

    Hope this helps with both the problem and the understanding as to why it may be happening.

    Let me know if you still have issues.

    Warm regards,
    Don

    • This reply was modified 6 years, 5 months ago by Don Fischer. Reason: better clarification/wording
    Thread Starter Miss. Starbuck

    (@desiwp)

    Hello Don, thank you for your reply.

    I have set the configuration as you advise, I will check in next days if it works (at this moment it is working fine).

    Thanks a lot!!
    Warm regards,

    No problem. Let me know if you have any issues.

    Regards,
    Don

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Products not showing’ is closed to new replies.