Skip navigation

More Static Page Caching

Note: We've discontinued this process and are using Drupal's boost module instead to produce cached versions of all pages for anonymous users.

Building on this article on creating static html pages rather than dynamic pages. It is important to note that in Drupal you can sort through the logs to easily find which pages are hit the most often, have the longest load times and have cost your system the most time in page generation. This is all available through admin -> logs -> pages and at that point you can find out which pages are problematic.

We can add to the previous page caching article some code to the shell script:

cd /home/drupal/files/tmp   
rm page_not_found
wget http://openconcept.ca/index.php?q=page_not_found
mv index.php?q=page_not_found page_not_found

and also a line to apache to ensure that this is displayed correctly

  AliasMatch ^/page_not_found$ /home/drupal/files/tmp/page_not_found

This way we can target specific pages that that are providing a drain on the website. You could also use this to create a static cache if a specific page was being slashdotted.