我使用PHPCassa从我的cassandra实例中获取值,其中我的结果数组如下所示:
Array
(
[1576_AF_ACTS_A300_2011-09-12] => 150
[1576_AF_ACTS_A300_2011-09-13] => 1565
[1576_AF_ACTS_A300_2011-09-14] => 1515
[1576_AF_ACTS_A300_2011-09-15] => 1519
[1562_AF_ACTS_A300_2011-09-12] => 1510
[1561_AF_ACTS_A300_2011-09-13] => 15189
[1563_AF_ACTS_A300_2011-09-14] => 15189
[1568_AF_ACTS_A300_2011-09-15] => 15125
[121_AF_ACTS_A300_2011-09-16] => 15123
[1580_AF_ACTS_A300_2011-09-12] => 15127
[1580_AF_ACTS_A300_2011-09-15] => 15189
[1580_AF_ACTS_A300_2011-09-17] => 15158
)现在,我想将结果存储在memcache中。我应该为此定义一个唯一的memcache键吗?
我得到的是一个无穷无尽的按键数组,我根据UI表单中的一些输入参数来构造它们的帧。
如何将此信息与唯一的memcache键一起保存?
发布于 2011-09-23 07:22:43
我建议避免使用memcache,而使用Cassandra的行缓存:http://www.datastax.com/docs/0.8/configuration/storage_configuration#rows-cached
这为您提供了一个更简单的体系结构,避免了从两层系统中获得的cache coherence问题。
https://stackoverflow.com/questions/7516795
复制相似问题