Separate out cache interface
chx - June 7, 2006 - 03:13
| Project: | Drupal |
| Version: | x.y.z |
| Component: | base system |
| Category: | task |
| Priority: | normal |
| Assigned: | chx |
| Status: | closed |
Description
This patch lets you create contributed cache interfaces for Drupal. Files, Berkeley DB, memcached -- you name it.
| Attachment | Size |
|---|---|
| separate_cache.patch | 5.02 KB |

#1
I forgot to add the new file.
#2
Made 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.
#3
Okay, 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.
#4
Jeremy, if you call variable_get before variable_init is called then it'll pull from
$confwhich is set in settings.php.#5
I 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.)
#6
I 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.
#7
Moshe seems to have forgotten the file. I have rerolled with the suggested name change.
#8
Committed to CVS HEAD. Thanks.
#9