[development] Static Page Caching

Joe Stewart joe at openconcept.ca
Tue Jan 10 18:20:02 UTC 2006


on 01/10/2006 11:25 AM Dries Buytaert said the following:
>>But it still isn't going to give you the snappy response that you'd  
>>get from a drupal page that has been cached as a static html page.   
>>A program like jpcache (http://www.jpcache.com/), would be a bit  
>>slower than a static page because apache would have to load php,  
>>and then load the cached file (from a file or db), however it would  
>>still use a fraction of the resources that a drupal site would.
> 
> 
> I fail to see the advantage of using jpcache over writing static  
> files.  Care to elaborate?
> 

For the static pages it would not.

For logged in users, you can cache the pages in another area, memcached, 
or db.  Also some sites on public web hosts might not want to write back 
to the public_html space.

We have patches to jpcache to control garbage collection and expiring 
pages.  Since drupal knows what changes are made and what pages it would 
affect, those cached pages can be expired/deleted.  This would give a 
much longer cache time and hit rate.  Also have extended jpcache to 
write a static cache for another project.

We were thinking more about a flexible cache mechanism that different 
backends could use.  jpcache is flexible for full page caching but 
doesn't handle subpage caching.  I've tested a memcached backend for 
jpcache as well.

Three are a couple of different use cases, like anon and identified 
users.  We aren't tied to jpcache but have used it for much this purpose 
very successfully.  The drawback for a page cache would be for something 
that might change with each pageview ( like if you have a simple banner 
system that subs in regular ad links and images each view).

Joe


> --
> Dries Buytaert  ::  http://www.buytaert.net/
> 



More information about the development mailing list