memcache限制(MySQL和PHP)[重复]

memcache限制(MySQL和PHP)[重复]

问题描述:

This question already has an answer here:

I've installed memcache (with the memcache PHP extension).

I have a database with 100 000 records (random).

When I select all of them, and when I try to store the output in memcache, it's not working. When I select just 1000, it's working (without changing the code, except: 'LIMIT 100000' to 'LIMIT 1000' in my SQL-query).

Does anyone has any idea what's the problem?

</div>

此问题已经存在 这里有一个答案: p>

  • 缓存超过1mb内存缓存备选方案 1回答 span> li> ul> div>

    我已经安装了memcache(使用memcache PHP扩展)。 p>

    I 有一个包含100 000条记录的数据库(随机)。 p>

    当我选择所有这些记录时,当我尝试将输出存储在memcache中时,它不起作用。 当我只选择1000时,它正在工作(不改变代码,除了:在我的SQL查询中'LIMIT 100000'到'LIMIT 1000')。 p>

    有没有人知道什么是 问题? p> div>

memcached has a (configurable) limit to how much memory it will use. Here is a list of the configuration parameters you can use with memcached.

I assume when you have that many rows, you're hitting the limit in memcached, so it begins purging the oldest entries. However, "it's not working" is not very specific, so there could be a whole array of things wrong.