If you're using Java, you could try loading a synchronized static
global object from an AppEngine database in a global static block.
This will trigger only when the servlet is first loaded by any server
and so you get both the speed of simple variables for requests without
having to call the
Right, exactly. When you're writing the data, you store it in the datastore
and memcache. When you're retrieving the data, you query memcache first, and
if it's not there, you query the datastore and re-set the memcache with the
value.
See: http://code.google.com/appengine/docs/java/memcache/
For
You would likely want to filter on the ID, and then do a get. See examples
here:
http://code.google.com/appengine/docs/python/datastore/queryclass.html
http://code.google.com/appengine/docs/python/datastore/queryclass.htmlSee
also the Python Memcache API instructions here:
Thanks Pamela,
It is a great option indeed but I found it quite slow. I compared it
with the old global variables version and this one is slower.
Is thee another way to do it? does normal storing to separate classes
work in this case or it is similar to global variables (got reset
after