Plugin Author
Timo
(@worschtebrot)
Thanks for your feedback.
This behavior can be explained with the initialization of the cache. If the cache is empty, all products are loaded via the API. This may result in request throttles from the API if too many items are requested per second. Then products may be missing in the presentation if it is an extensive collection. As soon as all products are in the cache after several requests, this behavior no longer occurs.
To prevent this behavior from occurring for visitors, it is possible to pre-fill the cache with cronjobs. ASA2 has already implemented appropriate solutions for this (see http://docs.getasa2.com/cronjobs.html).
So your title is misleading. It should mean: Random products from one collection during the first page views as long as the cache is empty. 😉
Thread Starter
sighan
(@sighan)
Pretty sure I wrote a lengthy reply to this two days ago. Did you delete that? I sure hope you didn’t and it just wasn’t sent for some reason.
Anyways, the plugin does not seem to use the cache. Caching is activated and has a lifetime well over 10 hours, still, every page reload other products are displayed. I think you are correct in assuming that amazon is throttling the requests, however these requests should not be happening in the first place, since the products are being cached (the files exist in the cache folder and they are being updated), however they ever seem to be loaded from the cache.
So my title is quite fitting, as it only shows random products with every page reload, no matter wether or not the cache is filled.
Plugin Author
Timo
(@worschtebrot)
I can not delete posts in this forum. So I guess it didn’t get through.
In the past few days I have been working hard on the caching topic in ASA1. Within the next few days there will be an update which will improve a lot! The cache will be given a new function to prevent the lifetime of products on one page from expiring at the same time (by adding a random variable amount of seconds, which can be up to 10% of the configured lifetime.).
In addition, ASA1 will receive a preload function that attempts to preload the products on a page in fewer because bundled requests. For example, if there are 20 products on a page that need to be refreshed, the preloading will only send 2 requests to the API instead of 20 as the current version would do.
Please wait a moment for these powerful new features in version 1.3. It will be available this week. I would appreciate your feedback on the new features to improve these features even more!
Thread Starter
sighan
(@sighan)
Thanks for the headsup. I will take a look when it is out and let you now if it solves the problem. I will of course change the review in that case 🙂