(Note: German version!) Slowly but surely, the static file cache is still in developing. This is the update of the current progess for the Static File Cache. After the story started with fl_staticfilecache in 2006, it was forked as nc_staticfilecache (German podcast). At the end of 2016, I took over the version. The extension has been migrated to Github / Packagist / Composer, so the newest version can be found under „lochmueller/staticfilecache“. There was a lot of changes in the last 1-2 years. So… this is the update.
What is the TYPO3 static file cache?
The TYPO3 static file cache is a cache, which is equipped with a clever set of rules based on PHP and htaccess, that pages that are in the cache are VERY FIX. We’re not talking about factor 2 or 3, but rather about the factor ~200 (measured with Apache benchmark). The reason for the performance increase is that the static files and htaccess file take care, that neither PHP nor the database is needed after the first hit. Especially the „missing“ PHP interpreter – and the associated direct delivery of the file – leads to this boost! In addition to this main function, there is also a backend module that shows which pages are in static file cache. If a page can not be cached, there are also some information why page isn’t cached. This is a good place to start optimizing a page, e.g. to find wrong configurations or badly developed plugins.
What has happened in the last 2 years?
With the migration to github.com I have worked hard on the code quality. Phpcs, phpmd, StyleCI, Scrutinizer and Travis ensure that the code is not only compatible with PSR-2, but also that mistakes and errors are avoided in the future. In the migration the PHP version was adjusted to 7.x and the extension works great under TYPO3 8.x and 9.x (If you still have TYPO3 7.x, please use staticfilecache [in an older version] instead of nc_staticfilecache). The backend module has been restructured, cleaned up and brought closer to a TYPO3 look & feel. In addition, the backend module is translated into German and English.
The biggest innovation in the TYPO3 static file cache extension is the „boost mode“. If the mode is activated, the static cache files are no longer removed by the caching framework (BE activities), but instead a queue is set up, which is processed in the background by a scheduler task. Big advantage of this solution: The user ALWAYS get a static file. Only drawback is that there is a small delay in publishing changes.
Last but not least, the documentation has been further optimized in the last 2 years so that the setup works well. If you have any questions, you will find the right answers in the documentation.
What’s next?
At the moment I am looking for more feedback from the community. I introduced the current version of the extension on the TYPO3Camp in Berlin and have already received feedback from 2-3 users. This is not enough for me? 😉 Every feedback is welcome: translation, testing, ideas or financial feedback.
In the next few weeks I will take care of the compatibility for TYPO3 9.x and adapt the code accordingly. In addition, I will write more tests, so that the quality of the code is better monitored and new developers get a quicker start into the extension.
I am looking forward to your feedback…
Do you need more information? All information are found on GitHub…