开发者

MySQL table caching returns stale data

I have query caching disabled (it's disabled by default on my installation) but kept getting outdated data in my application. For example, I would do a SELECT * on my review table, insert a new row and then do another SELECT *, but the new review wouldn't show up (although it would be there if I browsed to the table in phpMyAdmin). I disabled table caching (table_cache = 0) and things started working fine, with all new reviews showing up on the second SELECT *.

The MySQL documentation says that

The query cache does not return stale data. When tables 开发者_JAVA技巧are modified, any relevant entries in the query cache are flushed.

Is this not true for the table cache as well? Is there a way to have MySQL use table caching, but force it to flush the cache once a cached table is modified? I couldn't really find much to go by in the documentation .

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜