2013-06-06 13:18
浏览 85

如何在Couchbase PHP客户端库中进行异步设置

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?

图片转代码服务由CSDN问答提供 功能建议

在Couchbase PHP客户端库中有一个名为 getDelayed 接受回调作为参数,并允许您进行异步获取 couchbase。


有人知道这样做的方法吗? 实现异步get而不是set的原因是什么?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • dongmaqiu6084 2013-06-11 07:25

    The Couchbase client library does not provide asynchronous methods for set/update operations.

    点赞 评论
  • 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).

    点赞 评论

相关推荐 更多相似问题