[development] Re: Static Caching for Drupal (was CVS account
request)
Arto Bendiken
arto.bendiken at gmail.com
Sun Jun 4 17:11:55 UTC 2006
Hi Khalid,
On 6/4/06, Khalid B <kb at 2bits.com> wrote:
>
> On 6/4/06, Arto <arto.bendiken at gmail.com> wrote:
> > Currently, I'm finishing up a module that adds static page caching
> > capabilities for Drupal 4.7. (I've blogged about it at
> > http://bendiken.net/2006/05/28/static-page-caching-for-drupal.) Note
> > that this is unrelated to, and very different from, the on-going
> > optimization efforts in HEAD: my module is more of a "export whole site
> > into static HTML" approach, rather than a "lightweight PHP bootstrap"
> > optimization.
>
> Arto,
>
> You mean Jeremy's file based caching patch?
> http://drupal.org/node/45414
Yes, that's what I was referring to.
I'm involved with a number of Drupal sites that don't need much, if
any, dynamic functionality, so the module I'm working on (nicknamed
Boost) makes it possible to export them to static HTML, which can then
run even on hosts lacking PHP support altogether.
Personally, I prefer this approach of not involving PHP at all except
where it's necessary. No matter how fast and lightweight the Drupal
bootstrap can be made, static files can be served yet faster directly
by the web server.
Boost is dead simple, really, just caching out everything that has a
path alias defined for it, adding some mod_rewrite magic to the
.htaccess file (where it also ensures, via the presence of a cookie,
that logged in users don't get served a cached page), and tying it all
up into a nice Ajax-based admin interface to manage the cache. Cached
pages go into a directory cache/hostname.com/... under the Drupal
installation, so the module is multi-site compatible (with certain
reservations).
Obviously, this approach has limitations and is not suitable for all
(maybe even most?) Drupal sites, so it is complementary to Jeremy's
core patch. For those sites that can make use of Boost, though, it
provides the simplest kind of caching at pretty much the highest
possible performance (i.e. where the only thing slowing anything down
from the server's absolute max. throughput is mod_rewrite itself).
I'll elaborate on Boost in the near future, but ask away if you have
questions...
--
Arto Bendiken | arto.bendiken at gmail.com | http://bendiken.net/
More information about the development
mailing list