APC stores all entries in one cache which could lead to severe problems if multiple Drupal sites are installed on a server. Another (minor) nuisance is that it's hard to track Drupal APC entries in apc.php (the provided monitoring tool of APC).
Mediawiki has solved this problem my prepending all names of cache entries with the name of the DB followed by a colon. So if my Drupal site uses the database 'drupal_db' and Drupal wants to cache 'cache-schema' this will get stored as:
'drupal_db:cache-schema'
This should be a trivial patch (if the DB name is available to the module). I'm very new to Drupal, currently reviewing it as an option for implementation. If I implement I'll create a patch for this (if the maintainer of this module doesn't beat me to it :D)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | apc.zip | 7.67 KB | Johnny vd Laar |
Comments
Comment #1
slantview commentedThis has been fixed as of revision 1.4 of apc.inc. Thanks!
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
vacilando commentedWhere is the new version for D5? The latest release I see is from Sept 2007.
Comment #4
Johnny vd Laar commentedbecause there wasn't a drupal 5 version of this code i modified the code myself such that it works for drupal 5.
the modified version is in the attachment.
in the drupal 6 version the db prefix is used for the namespacing. because we don't use prefixes but seperate databases I used the $base_url for namespacing. you can modify this by replacing $base_url on line 241 and 242 by $db_prefix.
Comment #5
slantview commented