[wp-hackers] Caching as part of the core
lists at rotorised.com
Sat Jul 28 10:47:10 UTC 2012
Mike Schinkel wrote:
> I just scanned the code in WP Super Cache and what you said is not true; WP Super Cache does not load the provided object-cache implementation, which is in /wp-includes/cache.php.
> Yes WP Super Cache's /wp-content/advanced-cache.php does call /wp-content/object-cache.php, but the latter is also a dropin so you are proposing to solve the problem I identified with a solution that has the same problematic attributes of the problem identified.
And if there's not a dropin, then there's no need to use the object
cache at all. I'm not sure exactly what the issue with that is.
> I'll repeat a 3rd time the things I previously asked for on this thread (which nobody has yet acknowledged, btw) so that a kickarse caching API *could* be implemented:
> 1.) Load the Transients API before advanced-cache.php is called
> 2.) Enable multiple dropin files per type of dropin and enable hooks before advanced-cache.php
These are both chicken-and-egg problems. In order to use transients, we
need more of the WP core loaded, which is not possible at this stage.
So, we could then load the core, but that defeats the purpose of having
advanced-cache.php early (namely: to avoid having to load the core).
Ditto for enabling hooks before advanced-cache.php. This is more
lightweight in that it doesn't actually need anything loaded, so this
would be possible. On the other hand, it's still extra overhead that
most caching implementations won't need. (Keep in mind that they're
trying to exit() as soon as possible, so loading more things delays that.)
Mike, as the one who wants change, the onus is on you to prove why this
is a good idea, and to provide a patch. It seems that in this case, the
idea is linked rather heavily to the implementation, so an example
implementation of your aforementioned 3 issues would be nice, and would
probably serve to further the discussion (rather than keep it spinning
in circles as it currently appears to be).
More information about the wp-hackers