位置: 编程技术 - 正文
推荐整理分享PHP:Memcached::incrementByKey()的用法_Memcached类,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PECL memcached >= 2.0.0)
Memcached::incrementByKey — Increment numeric items value, stored on a specific server
说明 public int Memcached::incrementByKey ( string $server_key , string $key [, int $offset = 1 [, int $initial_value = 0 [, int $expiry = 0 ]]] )Memcached::incrementByKey() increments a numeric items value by the specified offset. If the items value is not numeric, an error will result. Memcached::incrementByKey() will set the item to the initial_value parameter if the key doesnt exist.
参数server_key
本键名用于识别储存和读取值的服务器。没有将实际的键名散列到具体的项目,而是在决定与哪一个 memcached 服务器通信时将其散列为服务器键名。这使得关联的项目在单一的服务上被组合起来以提高多重操作的效率。
keyThe key of the item to increment.
offsetThe amount by which to increment the items value.
initial_valueThe value to set the item to if it doesnt currently exist.
expiryThe expiry time to set on the item.
返回值Returns new items value on success 或者在失败时返回 FALSE.
参见Memcached::decrement() - 减小数值元素的值 Memcached::decrementByKey() - Decrement numeric item's value, stored on a specific server Memcached::increment() - 增加数值元素的值
PHP:Memcached::getAllKeys()的用法_Memcached类 Memcached::getAllKeys(PECLmemcached=2.0.0)Memcached::getAllKeysGetsthekeysstoredonalltheservers说明publicarrayMemcached::getAllKeys(void)Memcached::getAllKeys()querieseachmemcacheserverandretrievesa
PHP:Memcached::deleteMulti()的用法_Memcached类 Memcached::deleteMulti(PECLmemcached=2.0.0)Memcached::deleteMultiDeletemultipleitems说明publicboolMemcached::deleteMulti(array$keys[,int$time=0])Memcached::deleteMulti()deletesthearrayofkeysfromthes
PHP:Memcached::decrementByKey()的用法_Memcached类 Memcached::decrementByKey(PECLmemcached=2.0.0)Memcached::decrementByKeyDecrementnumericitemsvalue,storedonaspecificserver说明publicintMemcached::decrementByKey(string$server_key,string$key[,int$offs
标签: PHP:Memcached::incrementByKey()的用法_Memcached类
本文链接地址:https://www.jiuchutong.com/biancheng/280093.html 转载请保留说明!友情链接: 武汉网站建设