What's updating Drupal's cache all the time on this crazy i18n, og, custom site?
Step by step to finding what's wrong.
So after catching a few of the other caches (views, locale) that were running too much for different reasons, we still have a MySQL frenzy on our hands.
The query I see over and over again in Agaric's logs on the WSF2008 site is "INSERT INTO cache (cid, data, created, expire, headers) VALUES ('locale:pt-br', 'a:3757:{s:2\"MB\".....
And "UPDATE cache SET data = 'a:4334:{s:2\"MB\"
By the way, in vi to go to the previous occurrence of a search, to search backwards, it's capital N (shift+N) instead of just n.
These are both found in the function cache_set in http://api.drupal.org/api/file/includes/cache.inc/5/source
<pre>function cache_set($cid, $table = 'cache', $data, $expire = CACHE_PERMANENT, $headers = NULL) {
db_lock_table($table);
db_query("UPDATE {". $table. "} SET data = %b, created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $data, time(), $expire, $headers, $cid);
if (!db_affected_rows()) {
@db_query("INSERT INTO {". $table. "} (cid, data, created, expire, headers) VALUES ('%s', %b, %d, %d, '%s')", $cid, $data, time(), $expire, $headers);
}
db_unlock_tables();
}</pre>
Comments
Post new comment