TYPO free


fighting for TYPO free code

Static file cache

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 '?'.

What does it not do?

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.


  • apache
  • mod_rewrite


  • mod_expires
  • realurl


Try it out

You can get your own version from the extension repository. Just look for the key: nc_staticfilecache.

Read the full manual here: typo3.org/documentation/document-library/extension-manuals/nc_staticfilecache/2.3.1/view/toc/0/


Michiel 30 Jun 2008, 14:14
Feature request from Michael Janssen:

If you use the staticfilecache with big sites, the "clear cache" does not really work. I think, the deleting of the files is to much work for the server.

I have the phenomena with one installation with a few thousands sites in cache.


Thank you for the feedback Michael.

Thank you for that information. A suggestion has already been made to change the way the file deletion works. Like adding the files that need to be cleared to some kind of queue. The deletion queue could then be read by a cli (cron) task running nice -n 19 (low prio). That should give the server some breathing space.

For large installations it's always a problem to clear all cache. You should properly configure the cache clearing options in such a case (clearCacheCmd, clearCache_pageSiblingChildren, clearCache_pageGrandParent etc.). Note that it is also possible to disable cache clearing using clearCache_disable. These options are supposed to work on folder/page level. So you should be able to make a quite explicit cache clearing setup.
Камеры 26 Mar 2009, 10:40
I try to disable cache in my Typo-blog, but I can not undenstend how to do it?
In development enviropment cache is not work, and I am trying to disable it in production enviropment...
Just say it . . . *

* required