In a Django project, some cronjob programs are mainly used for administrative or analysis purposes, e.g. generating site usage stats, rotating user activities log, etc.
We probably do not hope MySQL to cache queries in those programs to save memory usage and improve query cache efficiency.
Is it possible to turn off MySQL query cache explicitly in those programs while keep it enabled for other parts including all views.py
?
Per http://dev.mysql.com/doc/refman/5.1/en/query-cache-configuration.html
There's not usually a compelling reason to bother, though. The query cache isn't nearly as important as you might think, particularly during off-peak periods (which I assume is when you would run the cron jobs).