开发者

Can auto transfer data from memcached to mysql DB?

I'm building a real-time service so my real-time database need to storage in memcached before fetch to DB (Avoid to开发者_JAVA技巧 read/write mysql db too much). I want to fetch data to mysql DB when some events occur , etc : before data expire or have least-recently-used (LRU) data. What is solution for my problem ? My system used memcached , mysql ,django and python-memcache Thank


Memcached is not a persistent store, so if you need your data to be durable at all then you will need to store them in a persistent store immediately.

So you need to put them somewhere - possibly a MySQL table - as soon as the data arrive, and make sure they are fsync'd to disc. Storing them in memcached as well only speeds up access, so it is a nice to have.

Memcached can discard any objects at any time for any reason, not just when they expire.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜