Memory Cache

The Google App Engine Docs pretty succinctly break down when and when not to use a memory-based cache like memcached.

One use of a memory cache is to speed up common datastore queries. If many requests make the same query with the same parameters, and changes to the results do not need to appear on the web site right away, the app can cache the results in the memcache. Subsequent requests can check the memcache, and only perform the datastore query if the results are absent or expired. Session data, user preferences, and any other queries performed on most pages of a site are good candidates for caching.

Memcache may be useful for other temporary values. However, when considering whether to store a value solely in the memcache and not backed by other persistent storage, be sure that your application behaves acceptably when the value is suddenly not available. Values can expire from the memcache at any time, and may be expired prior to the expiration deadline set for the value. For example, if the sudden absence of a user’s session data would cause the session to malfunction, that data should probably be stored in the datastore in addition to the memcache.

This is something that comes up very often when working with clients on the VIP Team, as the general thinking tends to be that adding something to a cache will magically fix performance problems (which is not true).