Skip to content

Instantly share code, notes, and snippets.

@ianawilson
Created October 11, 2012 16:30
Show Gist options
  • Save ianawilson/3873627 to your computer and use it in GitHub Desktop.
Save ianawilson/3873627 to your computer and use it in GitHub Desktop.
Cache initialization
protected function _initCache()
{
$frontend = array(
'lifetime' => null,
'automatic_serialization' => true
);
$backend = array(
'host' => 'localhost',
'port' => 11211,
'weight' => 1,
);
$cache = Zend_Cache::factory('core',
'Memcached',
$frontend,
$backend
);
Zend_Registry::set('cache',$cache);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment