Memcached best practices - small objects and lots of keys or big objects and few keys?

前端 未结 6 1777
梦谈多话
梦谈多话 2021-02-02 11:23

I use memcached to store the integer result of a complex calculation. I\'ve got hundreds of integer objects that I could cache! Should I cache them under a single key in a more

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-02 11:27

    I would say you should store values individually and use some kind of helper class to retrieve values with multiget and generate a complex dataobject for you.

提交回复
热议问题