zend framework - Zend_Cache_Core showing when I am trying to create cache file in view file -


i trying cache view file content , using following method inside view file,

$frontendoptions = array(     'lifetime' => 3600,     'automatic_serialization' => false );  $backendoptions = array(     'cache_dir' => '../cache' );  $cache = zend_cache::factory(     'core',     'file',     $frontendoptions,     $backendoptions );  $cache->save('somebody', 'filename', array('tag1', tag2)); 

it not creating cache file , showing error, same working fine in controller.

any appreciated.

thanks, suresh

replace

$cache->save('somebody', 'filename', array('tag1', tag2)); 

by

$cache->save('somebody', 'filename', array('tag1', 'tag2')); 

and

'cache_dir' => '../cache' 

by

'cache_dir' => application_path . '/../caches' 

with cache directory @ same level application directory


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -