# Query cache not working

**URL:** <https://forums.percona.com/t/query-cache-not-working/74>\
**Category:** Other MySQL® Questions\
**Created:** [August 30, 2006, 6:10pm UTC](https://forums.percona.com/t/query-cache-not-working/74 "2006-08-30T18:10:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Himalian](https://avatars.discourse-cdn.com/v4/letter/h/2acd7d/32.png) [@Himalian](https://forums.percona.com/u/Himalian)\
**Post date:** [August 30, 2006, 6:10pm UTC](https://forums.percona.com/t/query-cache-not-working/74/1 "2006-08-30T18:10:10Z")

</div>

Hi,  
since my server goes very slow under a bit of load I tried to enable the query cache. I’m just running WordPress (PHP 5.1) + MySQL 4.1.10a and it’s a VPS (Virtual Private Server) on Virtuozzu with Suse Linux 9.3

Below are the MySQL server variables:

have query cache YES YESquery cache limit 1048576 1048576query cache min res unit 4096 4096query cache size 0 0query cache type ON ONquery cache wlock invalidate OFF OFFquery prealloc size 8192 8192  
but the current status information just show:

Qcache free blocks 0 Qcache free memory 0 Qcache hits 0 Qcache inserts 0 Qcache lowmem prunes 0 Qcache not cached 0 Qcache queries in cache 0 Qcache total blocks 0

Did I miss a configuration value? There should be a lot of cacheable queries because the wordpress tables are rarely updated.

Best regards,

Himalian

---

<div class="post-metadata">

**Author:** ![Himalian](https://avatars.discourse-cdn.com/v4/letter/h/2acd7d/32.png) [@Himalian](https://forums.percona.com/u/Himalian)\
**Post date:** [August 31, 2006, 2:52am UTC](https://forums.percona.com/t/query-cache-not-working/74/2 "2006-08-31T02:52:03Z")

</div>

Oh, I’m sorry… I thought “query cache size” was the actual used size of the cache, not the maximum size. Works now )

---

<div class="post-metadata">

**Author:** ![Peter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/peter/32/2_2.png) [@Peter](https://forums.percona.com/u/Peter)\
**Post date:** [August 31, 2006, 6:15am UTC](https://forums.percona.com/t/query-cache-not-working/74/3 "2006-08-31T06:15:42Z")

</div>

Ok, Good you’ve found the problem )

---

<div class="post-metadata">

**Author:** ![Himalian](https://avatars.discourse-cdn.com/v4/letter/h/2acd7d/32.png) [@Himalian](https://forums.percona.com/u/Himalian)\
**Post date:** [August 31, 2006, 5:33pm UTC](https://forums.percona.com/t/query-cache-not-working/74/4 "2006-08-31T17:33:53Z")

</div>

Yes, sometimes it’s better to read the manual again instead of directly posting to a forum :o
