Hor*_*Fat 5 python concurrency google-app-engine google-cloud-datastore
例:
puts
在db/memcache中进行更新puts
在db/memcache中进行更新更新3.丢失.
可以使用什么策略/模式来防止这种情况?
您可能想使用cas
和gets
命令:
https://code.google.com/p/memcached/wiki/NewCommands#cas
编辑GAE memcache 实际上与 memcached 兼容。以下是 GAE 的参考资料:
https://developers.google.com/appengine/docs/python/memcache/clientclass#Client_cas
最后注意事项:
https://developers.google.com/appengine/docs/python/memcache/clientclass#Memcached_compatibility