zoukankan      html  css  js  c++  java
  • redis-共享对象池

    当数据为0–9999的整数时 ,默使用对象池。
    可以通过 object refcount 查看对象引用数。

    127.0.0.1:6379> set intx 5
    OK
    127.0.0.1:6379> object refcount intx #直接使用共享对象池内的整数对象。引用数是2。否则为1。
    (integer) 2
    127.0.0.1:6379> set intxx 5  #引用数+1
    OK
    127.0.0.1:6379> object refcount intx
    (integer) 3
    127.0.0.1:6379> object refcount intxx
    (integer) 3
    

    注意,当设置maxmemory【1】并启动LUR相关淘汰策略【2】,对象池无效,通过object refcount 查看其引用数会是1

  • 相关阅读:
    HDU 5444 Elven Postman 二叉排序树
    HDU 5438 Ponds dfs模拟
    Gym
    markdown test
    Gym
    集训回顾
    UVALive
    UVALive
    UVALive
    codeforcres 589 J
  • 原文地址:https://www.cnblogs.com/thewindkee/p/12873167.html
Copyright © 2011-2022 走看看