Extension Key: nc_staticfilecache
Copyright 2007, Michiel Roos, <extensions@netcreators.com>
Based on fl_staticfilecache by Tim Lochmüller, <tim@fruit-lab.de>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.com
It slows down the warming of the earth.
Tests with apachebench can show an increase in performance (requests served per second) by a factor of 230!
This extension generates static html files from static pages. If a static page exists, mod_rewrite will redirect the visitor to the static page. This means that TYPO3 will not be loaded at all. Your server will have less work to do and will use less power. This helps to keep our earth cool ;-)
This extension works transparently together with the TYPO3 cache. Static files will be generated for all pages that TYPO3 caches in the cache_pages table. It uses the same decision making logic the 'tslib_fe::sendCacheHeaders function uses to decide if a static file will be generated and it uses the same logic as in t3lib_TCEmain::clear_cache when removing static files.
Static files are created by default (following the sendCacheHeaders logic) but only when the uri contains no '?'.
It does not attempt to take into account any conditions and or, timers. If you are looking for an extension that takes this into account, take a look at kb_quickfe. We depend on the clients browser here since no Cache headers are sent when reading a statically cached file. This means we have no control over when or if the client browser will ever check if our static page has changed on the server.
Useful for really static pages only.
Tim Lochmüller – typo3.fruit-lab.de
Michiel Roos - extensions@netcreators.com - http://www.netcreators.com
Marc Hörsken - info@sourceplugins.de - http://www.sourceplugins.de, for adding simulateStaticDocuments support
Helmut Hummel, for tipping me on the 'external url' bug.
Dr. Hartmut Plehn and Dirk Wildt, Alexey Boriskin, for the tip on fileCreatemask and version_compare()