开发者

memcache alongwith PHPCassa

I am using PHPCassa to get values out of my cassandra instance where my result array looks something like :

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
)

N开发者_JAVA百科ow, I want to store my result in memcache . What unique memcache key should I frame for this ?

What I have got at my disposal is an endless array of keys which I frame based on some input parameters from a UI form.

How can I save this information alongwith a unique memcache key?


I would recommend avoiding memcache in favor of Cassandra's row cache: http://www.datastax.com/docs/0.8/configuration/storage_configuration#rows-cached

This gives you a simpler architecture that avoids the cache coherence problems you get from a two-layer system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜