while trying to help out with #643984: Cache menu_get_item(), i tried to get the D7 port of APC going using the sexy new pluggable cache API.

unfortunately, it goes like this:

cache system goes to create a new cache object, autoload kicks in, asks the registry for the class file. the registry goes, ok, i'll check my cache for that, cache system goes to get creata a new cache object, autoload kicks in, asks the registry for the class file...

this is only not broken in head because by default we load includes/cache.inc, and the default cache implementation lives in that file.

CommentFileSizeAuthor
#2 cache_implementation_path.patch1013 bytesAnonymous (not verified)

Comments

damien tournoud’s picture

Status: Active » Closed (won't fix)

Yes, if you want to use a different implement for the cache_bootstrap bin, you have to load the file it lives in yourself. This particular bin can only be switched from settings.php anyway, because the variable system depends on the cache.

This is a won't fix.

Anonymous’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new1013 bytes

discussion with catch in #drupal.

catch: beejeebus: if we have to, add an array in $conf of files to load by the registry.
beejeebus: catch: yeah, thought of that. not sure where i land on that trade off between ugly and fast
catch: beejeebus: or rip the registry.
catch: again :/
beejeebus: catch: yeah, that's another option. or allow the cache implementation file path to be set in $conf, like we let cache.inc be set in conf
beejeebus: will post those options

i prefer the third option, as we have some precedent for allowing cache stuff to be set in $conf. attached patch does that, but i'm open to either of the first two options.

Anonymous’s picture

Status: Needs review » Closed (won't fix)

discussed this with DamZ in #drupal. he's probably right, the 'cache_bootstrap' handler has to be hard-coded one way or the other if we want to avoid the database entirely, because the cache system relies on the varialbe_system. i think i agree with the wont fix.

Crell’s picture

I've been trying for a while to get the cache system to use *any* advanced loading system for a while now. I've pretty much given up. Caching is just too low level to rely on any higher level functionality without creating circular dependencies. Sad, but I see no way around it.