Question about caching

rhlowe - July 22, 2008 - 18:06

I have been evangelizing Drupal at my latest company and am 99% of the way to having my boss convinced that Drupal is a good platform for our next company site (which is good considering most of the work is already done!). I have but one question. Concerning caching, I have always used it and assumed that whatever needed to be cached was and never put too much additional thought into it. My boss, a 36 year IT veteran wants to know exactly what is being cached, so is it the content, the queries or both?

caching

styro - July 22, 2008 - 19:59

There is a page cache for anonymous visitors ie the whole HTML page for that url is cached. Drupal 6 has a block cache where the content of blocks may be cached depending on how they are written (even for authenticated users). Drupal will cache certain objects internally that might get called again within a single page request eg node, user, taxonomy objects etc. And that is just the core stuff, there are all kinds of contrib modules for caching different things in different ways.

And (outside of Drupal) you can also configure MySQL to cache queries, and you can also install an opcode cache (eg APC) to cache PHP code.

--
Anton
New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal

Thank you! I do have a quick

rhlowe - July 22, 2008 - 20:07

Thank you!

I do have a quick add-on to my question. For our site, all users that are not also employees will be anonymous users. In the event that the server that houses my mysql database (it will be a separate server than the one that serves everything else) becomes unreachable, will Drupal continue to serve whatever content it can from the cache?

No

styro - July 22, 2008 - 21:39

The page cache is in the database. But various modules have been written for file based caching - I don't know what state they're in though or whether they would still work without the database at all.

--
Anton
New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal

Thanks!

rhlowe - July 22, 2008 - 21:55

Thanks for the feedback! I am looking into Cache Router and it's capabilities.

 
 

Drupal is a registered trademark of Dries Buytaert.