zoukankan      html  css  js  c++  java
  • memcache缓存命中深入理解转载

    http://www.iteye.com/topic/225692

    memcache的方法有

    add,set,replace,get,delete,getstats,increment,decrement,close,

    上面的add是在之前key对应的value中添加新的内容,set是在之前key对应的value设置新的内容,覆盖之前的内容。

    set、add和replace的区别是什么?

    set:http://php.net/manual/en/memcache.set.php

    add:http://php.net/manual/en/memcache.add.php

    replace:http://php.net/manual/en/memcache.replace.php

    Replace value of the existing item

    Memcache::replace() should be used to replace value of existing item with key

    replace使用时key值对应的item必须存在。如果不存在,返回false。可以用set代替。

    Memcache::add() stores variable var with key only if such key doesn't exist at the server yet.

    必须key值不存在才能使用add。

  • 相关阅读:
    BTree和B+Tree详解
    python小技巧01递归解释内嵌
    Python实战171201筛选数据
    学术网站
    现代科技新闻
    人工智能——深度学习介绍
    时区缩写
    centos7忘记root密码
    centos7正确关机重启
    虚拟化漫谈
  • 原文地址:https://www.cnblogs.com/usual2013blog/p/3863456.html
Copyright © 2011-2022 走看看