This is a simple caching class based on php-apc that allows your php application boost performance many times. It has a builtin simple mutex implementation to avoid race condition issues with multiple concurrent request, that could possibly overload your server.
Idea is very simple, when a new request is comming, hold all concurrent request to the same resource (mutex), let only one to execute and send the same result to all other request. This way you can greatly decrease your sever load.
Put following code at the beginning of your index.php
require 'KickAssCacheApc.php';
$cache = new KickAssCacheApc();
$cache->capturePage();
The KickAssCacheApc work with any framework including ZF2, Symfony2, etc. It is strongly recommended to use this class on nginx + php-fpm based hosting.
KickAssCacheApc was testes against following versions of php:
- PHP 5.2.x
- PHP 5.3.x
- PHP 5.4.x
More in benchmark.txt, more than 2000 requests per second!