我正在寻找一个解决方案来替换Zend 3应用程序中的Zend 1/2缓存。旧的应用程序正在使用
$cache = Zend_Cache::factory('Core', 'File, $frontendOptions, $backendOptions)
获取缓存实例。我怎样才能在Zend Framework 3中获得相同的实例?
看看这段代码。完整的描述可以找到here
$cache = \Zend\Cache\StorageFactory::factory([
'adapter' => [
'name' => 'filesystem',
'options' => [
'namespace' => 'builder',
],
],
'options' => [
'cache_dir' => 'data/cache',
],
'plugins' => [
'exception_handler' => [
'throw_exceptions' => true,
],
'Serializer',
],
]);