Skip to content

Instantly share code, notes, and snippets.

@wesleywillians
Created February 2, 2013 14:48
Show Gist options
  • Save wesleywillians/4697642 to your computer and use it in GitHub Desktop.
Save wesleywillians/4697642 to your computer and use it in GitHub Desktop.
public function getServiceConfig()
{
return array(
'factories' => array(
'Cache' => function($sm) {
$config = $sm->get('Config');
$cache = \Zend\Cache\StorageFactory::factory(
array(
'adapter' => 'memcached',
'ttl' => 3600,
'namespace' => 'foobar',
'servers' => array(
array('127.0.0.1', 11211)
),
'plugins' => array(
'exception_handler' =>
array('throw_exceptions' => true),
'Serializer'
),
)
);
return $cache;
}
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment