The "cacheUseLang" property in a directive (Kohi's 'routes') tells the cache to cache a full page based on the prefered language. But when activated, apache bench tells me that it actually takes longer to deliver the content compared to not using a cache while using the cache without "cacheUseLang" set to true everything works as expected.
No errors or exceptions are thrown.
ab -t 30 -c 10 http://localhost/kohi/public/?/mainCached:
Requests per second: 2810.58 [#/sec] (mean)
ab -t 30 -c 10 http://localhost/kohi/public/?/mainCachedWithLang:
Requests per second: 379.76 [#/sec] (mean)
They both point to the MainController which has the following contents at this time:
<?php
class MainController extends kohi_Controller
{
public function run()
{
$view = m('kohi_NativeTemplates'); // load the native templates module
$view->_setOption('multilingual',true); // tell the module to use multilingual templates
$view->includeTemplate('kohi/main',array('view'=>$view));
return true;
}
}
?>
Additional info:
In core/Kohi.php, the caching process is started using output buffering.
In run() it is terminated and the buffer is written to a file.
And in public/index.php the cached page is delivered when it is found.
As of yet, I have no real clue what's going wrong.