Zend . Zend . . , memcache, Sqlite ..
, , .
protected function _initCache(){
$frontend= array(
'lifetime' => 7200,
'automatic_serialization' => true
);
$backend= array(
'cache_dir' => '../application/tmp/',
);
$cache = Zend_Cache::factory('core',
'File',
$frontend,
$backend
);
Zend_Registry::set('cache',$cache);
}
zend factory . zend- File, -, , .
, zend, , ..
, .
$result1 ="";
$cache = Zend_Registry::get('cache');
if(!$result1 = $cache->load('mydata')) {
echo 'caching the data…..';
$data=array(1,2,3);
$cache->save($data, 'mydata');
} else {
echo 'retrieving cache data…….';
Zend_Debug::dump($result1);
}
. , , , ,
, .
.
json.