This patch lets you create contributed cache interfaces for Drupal. Files, Berkeley DB, memcached -- you name it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

FileSize
9.57 KB

I forgot to add the new file.

chx’s picture

FileSize
11.9 KB

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.

Jeremy’s picture

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.

chx’s picture

Jeremy, if you call variable_get before variable_init is called then it'll pull from $conf which is set in settings.php.

Dries’s picture

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.)

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

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.

chx’s picture

FileSize
12.17 KB

Moshe seems to have forgotten the file. I have rerolled with the suggested name change.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)