Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch lets you create contributed cache interfaces for Drupal. Files, Berkeley DB, memcached -- you name it.
Comment | File | Size | Author |
---|---|---|---|
#7 | separate_cache_2.patch | 12.17 KB | chx |
#2 | separate_cache_1.patch | 11.9 KB | chx |
#1 | separate_cache_0.patch | 9.57 KB | chx |
separate_cache.patch | 5.02 KB | chx | |
Comments
Comment #1
chx CreditAttribution: chx commentedI forgot to add the new file.
Comment #2
chx CreditAttribution: chx commentedMade bootstrap a bit more fine grained and made 'fastpath' possible. The file caching already does it, and likely all non-SQL caching mechanisms will want it.
Comment #3
Jeremy CreditAttribution: Jeremy commentedOkay, so you're proposing that the 'cache_inc' variable is used to determine which cache.inc file to use? The problem being, you need to know the cache type before you can retrieve variables, otherwise you're dependant on pulling this information out of the database which means a fastpath is not possible.
To solve, I would suggest that the location of cache_inc (as well as the enabling/disabling of a fastpath) be configured in settings.php.
Comment #4
chx CreditAttribution: chx commentedJeremy, if you call variable_get before variable_init is called then it'll pull from
$conf
which is set in settings.php.Comment #5
Dries CreditAttribution: Dries commentedI like this approach. :-)
I hate the name 'FASTPATH' though -- it isn't very descriptive. Also, the existing name 'PAGE_CACHE' is no longer accurate. FASTPATH also enables 'page caching'. Maybe we need to use DUMB_PAGE_CACHE and SMART_PAGE_CACHE, or EARLY_PAGE_CACHE and LATE_PAGE_CACHE?
(Also, if the database caching could use dumb or early page caching, we'd probably see significant performance improvements as well. Cfr. with Jeremy's fastpath file caching.)
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedI did a code review and quite some testing. Everything is in order.
Instead of fastpath and page_cache, i also like EARLY_PAGE_CACHE and LATE_PAGE_CACHE. I rerolled with this naming, and and set to RTBC.
Comment #7
chx CreditAttribution: chx commentedMoshe seems to have forgotten the file. I have rerolled with the suggested name change.
Comment #8
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #9
(not verified) CreditAttribution: commented