I think this module is a great idea. I'm suffering from database overload so really need it's help! I have it setup / installed correctly - and I can see it;s working n memcache logs, however my site watchdog is showing lots of the following 2 errors:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; /* not cached */' at line 1 query: SELECT SUBSTRING(name, 30, 3) AS vid FROM variable WHERE name LIKE 'taxonomy_hierarchical_select_%' AND value LIKE 'i:1\;'; in /var/www/vhosts/mysite/httpdocs/includes/database.mysqli.inc on line 158.

Duplicate entry '61e50040d9bfb2952c6e4b7deccb0c5a' for key 1 query: SELECT * FROM system WHERE type = 'theme' in /var/www/vhosts/mysite/httpdocs/includes/database.mysqli.inc on line 158

I patched the database.mysqli.inc file and used the provided sample setting.php configuration:

// Enable or disable query cache
global $QUERY_CACHE;
$QUERY_CACHE = true;

require_once('modules/querycache/querycache.module');

function getCacheQueryExpiryTime($sql)
{
	if(ereg(".*FROM system.*",trim($sql))) return 60;
	if(ereg(".*FROM role.*",trim($sql))) return 60;
	if(ereg(".*FROM access.*",trim($sql))) return 60;

    return 0;	// If not found, do not cache
}

Thanks for any info

Comments

plan9’s picture

Title: 'Duplicate entry' and 'You have an error in your SQL syntax' errors. » Incompatible with Drupal 5.2x

After more testing I've found this module to be completely unstable / unusable. It causes numerous problems -with potentially serious consequences. In particular the patch for database.mysqli.inc is against Drupal 5.7 and therefore way out of date.

I'm changing the title of this issue to alert others.