There are 3 main variables, which can be used to tune Query Cache settings. They are query_cache_size, query_cache_limit and query_cache_type.
As the query arrives to MySQL server it performs a textual comparison with the queries in the Query Cache. This means "SELECT * FROM a" and "Select * From a" will be recognized as different queries. If a query matches one stored in the cache, the cached result is returned. If not, then the query is executed and if parameters allow the query result is stored in the query cache. When a table is modified, queries stored in the cache using the modified table, are removed from query cache.
------------------------------
http://www.softsea.com/