On at least one fairly busy site, it appears that the cache maintenance for Amazon Store is a strain. The cache_amazon_store table is becoming too large, and insert times are actually slowing down the web server.
Some things that can be done to improve this:
1. Separate the item and search caches into separate tables
2. Limit retention time or cache size. Break the dependency on the Amazon retention time.
3. Don't update items that come in from a new search if they're already cached
4. Possibly add an option to stop caching. I'm not sure if this would actually work, as the data is not always available otherwise.
Comments
Comment #1
tomt-2 commentedJust an idea on this issue... Currently all caching apparently is in the cache_amazon_store table.
The Amazon module itself uses following tables:
- amazon_book
- amazon_dvd
- amazon_item
- amazon_item_editorial_review
- amazon_item_image
- amazon_item_node
- amazon_item_participant
- amazon_music
- amazon_software
If the Amazon Store module can use those tables I see several benefits:
- no double caching for the same data,
- ability to filter products and create views on the data stored in those tables. All table fields there are spoken field names instead of one BLOB field with all data in cache_amazon_store.
- Further, all updates (i.e. pricing) will be handled by the Amazon module itself.
Comment #2
rfayThanks for the thoughtful note.
I'll look at it again on the next round with this.
Since I don't have control of Amazon module, it's difficult to make a lot of use of its caching, as it was intended for very different purposes. And in many cases, the item is turned into an entirely different thing, whereas in Amazon Store it's kept as a usable item as delivered from Amazon, so it can always be traversed as their data structure.
Comment #3
rfaySince the XML Caching is pretty fundamental to how Amazon store works, I'll probably stick with that even though I am now a maintainer on Amazon Store. However, I hope to improve caching before a 1.0 release and before the 7.0 port.
Comment #4
rfayImproved by splitting the searches and the items into separate tables, and giving smaller refresh intervals.
Committed:
http://drupal.org/cvs?commit=298424