A typical usage of the memcache (in pseudocode) looks like this:
Map data = getFromMemcache(key);
if(data == null){
data = doSomethingThatTakesAWhile();
setMemcache(key, data);
}
return data;
If the setMemcache call could be asynchronous, that would be about 10 less milliseconds the user has to wait for their response. The function in this scenario doesn’t really care if the setMemcache call was successful, so it doesn’t need to synchronously wait for it.
Is there a way to do an asynchronous memcache set in app engine? If there isn’t currently, is it something that could be possible in the future?
When you first asked this question, it was not possible.
But it is now possible to do asynchronous memcache operations in the Python version of the SDK starting in version 1.5.4 (see the announcement) and for Java users from version 1.6.0 (announcement)