Use session state to store values that are unique to each user. Use memcache
to store values at the application level that are share among all users.

Session state will persist your data across requests. Memcache can do
likewise but its memory can be reclaimed by the system so there is no
guarantee that you will have access to your data and you have to be prepared
to recreate it.

Also keep in mind that both session state and memcache have limits on the
amount of storage that they provide which you can find in the documentation.

You can also use the datastore but that comes with a whole different set of
issues and I wouldn't use it as a temporary cache if there were better
alternatives.

I always look for the simplest solution and if I only needed to store data
within a single request I would use an instance reference or a class
reference depending on whether or not the data is a singleton or not.

If my needs extended beyond a single request I would use session or
memcache.

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to