READ FIRST
---------
Always remember that AMAZON PA API has a throtteling mechanism! That means even if you have more api credits you can not hammer, sending like 60 request per minute

What you can do is group ASINS, max. 10 and send that in 1 request. That is what we do using cron.

Keep that in mind for any ideas or changes.

Token Filter
--------
The token filter is a bit more complex to avoid throtteling. If you use an ASIN multiple times, that will result in only one ASIN for the request.
If you use more that 10 different ASINS on one page(body with tokens) you will run into throtteling.
So there is a delay option that will be mentioned later, READ CAREFULLY if you activate it.

Cron
---
Cron function updates already existing data in the tables.
We also get old data to make sure nid/source are kept! Otherwise they would be overridden!

Saving a node
--------------
It is not possible to save an invalid ASIN on an ASIN field, you get an error warning.
BUT the ASIN can become invalid over time and still is in the db/field

Saving/using tokens
-------------------
You can use a token filter. If you use more than 10 different ASINS in tokens that will trigger like 2 requests in 1 second leading to throtteling.
There is an experimental delay for that in the admin settings.
BUT that delay will also add to the page laoding time if it is a non cached page.
SO BE CAREFULY WITH THAT

If you view a node that has not yet any tokens parsed, there is no entry in the db, so a VIEW of that page will create this data in the database.

Source and node id
-------------------
If possible we save the source(field/token) and the node id using that ASIN into the database too.
That context is sadly only avaliable when requests are triggered by saving a node or viewing one manually, see "Saving/using tokens" and "Saving a node".

When you use, for example VBO to resave all nodes that data is NOT avaliable! When you use cron that data is also NOT avaliable!

If an ASIN is used in a field and as a token the source is either field or token. Too keep it simple i leave it as this for now.
See: Custom view for fields.















