The Couchbase client library does not provide asynchronous methods for set/update operations.
In the Couchbase PHP client library there is a exposed method called getDelayed that accept a callback as a parameter and allows you to do a asynchronous get to couchbase.
The problem is that I can't find any method to do a asynchronous set (I'm expecting something like setDelayed).
Anyone know a way to do this? What can be the reason to implement a asynchronous get and not a set?
2条回答 默认 最新
- 已采纳 dongmaqiu6084 2013-06-11 07:25点赞 评论 复制链接分享
- dras2334 2013-06-08 04:53
I'm wondering what the purpose would be ... the async get makes sense ... you send a bunch of keys and get a response whenever the data is sent back to you. With a set you're going to send the data to the server. The couch server will cache the data in memory and return instantly. My understanding is that it queues it for disk writing. After writing to disk it queues it for indexing of views. There really isn't much to "delay". It returns to you immediately after writing it to memory. There isn't anything to do asynchronously is there? The only thing I could think of is the driver could cache it for you before sending it the couch server, but I'm not sure that would accomplish much except for using memory in the couch client (harder to debug oom errors).点赞 评论 复制链接分享