我正在使用 memcached and c++ .我想使用 c++ api 从服务器中删除所有 key 。最好在没有 key 列表的情况下删除它们。
文档中有函数:memcached_dump和 memcached_delete .第一个返回键列表,第二个 - 删除它们。
但这里引用了第一个函数的文档:
memcached_dump() is used to get a list of keys found in memcached(1) servers. Because memcached(1) does not guarentee to dump all keys you can not assume you have fetched all keys from the server.
第一个问题:获取所有键的任何方法,第二个问题是:如何使用这些函数。文档中没有任何示例。
谢谢。
最佳答案
听起来像你想要的memcached_flush
?
关于c++ - 从缓存中删除 key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10830787/