The call to get_multi_async
actually returns an RPC
object which you use to later do the result.
client = memcache.Client()
rpc = client.get_multi_async(['key1', 'key2'])
# Do other work
result = rpc.get_result()
If you want, you can make your own RPC
object which allows you to control the deadline and also provide a callback to be invoked when the fetch is finished:
client = memcache.Client()
rpc = memcache.create_rpc(deadline=30, callback=my_callback)
client.get_multi_async(['key1', 'key2'], rpc=rpc)
Note that the RPC object you make has to be from the memcache
package, not the urlfetch
one.