PHP is great for writing quick dynamic stuff for your website. Just a couple of lines of code can be written in 2 mins to insert or retrieve data from db. But with ease there is also some pain… the downside is that each request for a dynamic page can trigger multiple db queries, processing of output, and finally formatting to display on browser. This process can eventually be slow on larger sites or slower servers.
In this article, we’ve put together the list of caching plugins and techniques which can be used to improve your website performance.
- Caching output in PHP – Caching of output in PHP is made easier by the use of the output buffering functions built in to PHP 4 and above.
- PHP Caching to Speed up Dynamically Generated Sites – Instead of regenerating the page every time, the scripts running this site generate it the first time they’re asked to, then store a copy of what they send back to your browser. The next time a visitor requests the same page, the script will know it’d already generated one recently, and simply send that to the browser without all the hassle of re-running database queries or searches.
- Alternative PHP Cache – A free and open opcode cache for PHP. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.
- PHP-Cache-Kit – Dramatically speed up your site with this easy-to-use PHP caching kit. A slim little PHP class which allow you to quickly and easily implement module-level caching into your PHP projects.
- Unearth PHP Cache Engine – A flexible, easy-to-use system for caching PHP pages. It is really intended to cache a series of parts of a single page independently, each with its own refresh requirements. Caching of this sort can dramatically decrease page rendering time.
- PHP Cache Class – A PHP class that caches output generated by PHP files and uses the cached version instead of generating the content again and again. Cache files expire after a specified amount of time.
- PHP Accelerator – A plugin PHP Zend engine extension that provides a PHP script cache and is capable of delivering a substantial acceleration of PHP scripts without requiring any script changes, loss of dynamic content, or other application compromises.
- gCache – A PHP class that can be used to capture and cache Web page content. It can store cached content in files of a given directory.
- Skycache – A free, lightweight, and fast page cache for PHP 4 and PHP 5. Once a dynamic page has been computed, it is stored in a page cache. If a query for the same URL is made afterwards, the content is immediately served from the cache instead of processing the script again. The end result is a significant speedup and a slightly reduced server load.
- eAccelerator – A further development of the mmcache PHP accelerator and encoder. It increases the performance of PHP scripts by caching them in a compiled state, so that the overhead of compiling is almost completely eliminated.
- PHP FastFileCache – Caches output from dynamic PHP scripts, and stores them in files for fast retrieval under high server load. It supports a global timeout setting for maximum cache age, as well as per-file timeout overrides. It also implements file locking, to prevent data corruption and unnecessary processing.
- CacheIt – A PHP class designed to facilitate caching.
- Turck MMCache for PHP – A free PHP accelerator, optimizer, encoder, and dynamic content cache. It increases performance of PHP scripts by caching them in a compiled state, so that the overhead of compiling is almost completely eliminated.
- TinyButStrong – A template class for PHP that allows you to generate HTML pages using MySQL, PostgreSQL, SQLite in native, and any other databases.
- Boost website performance in 5 seconds! – Not exactly caching but simple enough to implement a quick fix.