Here is the flow of logic when we use memcached with SimpleDB:
1. When you need to retrieve data from SimpleDB, first query memcached server to see if the data is currently available in the cache.
2. If the data is in the cache, then simply return the data, and do not make a request to SimpleDB.
3. If the data is not in the cache, retrieve it from SimpleDB, and store it in the cache before returning the results back, so it is available next time you need it in the cache.
4. If you are updating the data, all you have to do is update SimpleDB and also delete the data from the cache. This will ensure that the next request from the data will get the latest information from SimpleDB and not outdated information from the cache. You can also just update the cache with the latest data that you have, thus alleviating any issue with eventual consistency, returning stale data when you turn around and make a request immediately.
5. If you have data that automatically...