Take a look at this code:
$cache = Zend_Cache::factory('Output',
'File',
$frontendOptions,
$backendOptions);
// we pass a unique identifier to the start() method
if(!$cache->start('mypage')) {
// output as usual:
echo 'Hello world! ';
echo 'This is cached ('.time().') ';
$cache->end(); // the output is saved and sent to the browser
}
As this doc explains, the above will not get into block statement if it has already been processed, consequently, the time won’t refresh. Lets say the expire time is configured to 30 seconds.
Visitor A comes and the Output is cached, so obviously, the visitor would see the same time for multiple refresh for 30 seconds. My question is that if Visitor B comes along the same time, will he see the same time as Visitor A because its already cached or the caching will be user specific?
Yes, he will, because that the reason, why one should use caches: Don’t process stuff for every single user over and over again. You could create the cache-ID with something user specific
but then you should ask yourself if it’s really worth to get cached.