0

I am looking for a solution to replace the Zend 1/2 cache in a Zend 3 application. The old application is using

$cache = Zend_Cache::factory('Core', 'File, $frontendOptions, $backendOptions)

to get the cache instance. How could I get the same instance in Zend Framework 3?

1 Answers1

0

Have a look of this code. Full description can be found here

$cache = \Zend\Cache\StorageFactory::factory([
    'adapter' => [
        'name' => 'filesystem',
        'options' => [
            'namespace' => 'builder',
        ],
    ],
    'options' => [
        'cache_dir' => 'data/cache',
    ],
    'plugins' => [
        'exception_handler' => [
            'throw_exceptions' => true,
        ],
        'Serializer',
    ],
]);
Marcel Djaman
  • 1,276
  • 1
  • 17
  • 34