Code: Select all
<?php
include 'Zend/Cache.php';
$frontendOptions = array(
'lifetime' => 7200,
'automatic_serialization' => false,
'default_options' => array(
'cache' => true
)
);
$backendOptions = array(
'cache_dir' => './tmp/'
);
$cache = Zend_Cache::factory('Page', 'File', $frontendOptions, $backendOptions);
$cache->start();
echo time();Now, my understanding is that when I load this script in my browser it should save the page contents (the current timestamp) and then output that initial timestamp for the next 7200 seconds. However, when I load this sample page in FireFox or Safari, it displays a new timestamp each time and nothing is saved in the ./tmp/ directory. However, when I run apache bench like this:
Code: Select all
ab -n 1000 -c 100 http://wire.dev/cachetest.phpCan someone help me figure out what is going on?