Created
October 11, 2012 16:30
-
-
Save ianawilson/3873627 to your computer and use it in GitHub Desktop.
Cache initialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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