Closed (fixed)
Project:
Advanced cache
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 May 2007 at 14:08 UTC
Updated:
15 Jun 2007 at 10:47 UTC
Attached is a patch for advcache.module (5.x CVS HEAD), containing a patch for forum.module (5.1) that allows to cache the result of forum_get_forums() function which is a database consumming function.
Note that there is the same access issue as with the taxonomy_cache.patch. So be carefull.
| Comment | File | Size | Author |
|---|---|---|---|
| advcache_forum.patch | 4.9 KB | aymerick |
Comments
Comment #1
aymerick commentedPatch needs review :)
Comment #2
robertdouglass commented@aymerick - committed, thanks! Please test installation, upgrading, and cases where you turn forum module on and off. Assign this issue to yourself and set to "fixed" when you've checked all of those aspects one more time.
Comment #3
robertdouglass commentedps I changed the code in advcache.install a bit from what was in the patch, so take a look there.
Comment #4
aymerick commentedTested:
Done all those tests on a fresh drupal 5.1 filled thanks to devel_generate.module (patched with: http://drupal.org/node/148411).
And... no issue found :)
Comment #5
wim leersThis seems superb!
But... I don't like what I read in the last comment.:
Will this not adversely affect performance? If so (and I cannot think how it could not), how do we tackle this? I guess we just can't?
Comment #6
robertdouglass commented@Wim: only because Drupal has such nice hooks can we even consider caching strategies like the ones here. We absolutely have to clear the cache when the content changes, otherwise all sites will be broken =) The extra round of testing I requested is a tip-of-the-hat to the complexity of predicting all combinations of cache states plus enabled/disabled modules. It's all a bit complex. In the end, the cost of clearing and rebuilding the cache when new forum topics and comments are created is tiny compared to the reads that are done, so I expect this patch to make a difference on all sites, even those where the cache is cleared very very often.
Comment #7
wim leersI agree.
I was just thinking aloud about the edge cases.
Comment #8
(not verified) commented