Many of our queries should never be stored in the MySQL
query cache. We can help MySQL save some of that cache
space, and time too, by telling it so.
Not sure of the best way of doing this, but the thing
that comes to mind is an instance var in $slashdb that
we could set that means "add NO_SQL_CACHE to all SELECTs".
Another way would be to declare a list of table names
that it never makes sense to use the query cache on
(obvious candidate: accesslog, and every other table
that typically changes every few seconds). Then all the
sqlSelect* methods would regex their $tables input
against that list.
Log in to post a comment.