你们中有人知道如何使用doctrine2为zf2分页配置缓存吗?
我点的方式:
$cache = \Zend\Cache\StorageFactory::factory (
array (
'adapter' => array (
'name' => 'Filesystem',
'options' => array (
'ttl' => 10,
'cache_dir' =>__DIR__.'/../../../data/cache/',
),
'plugins' => array (
'serializer' => array(
'serializer' => 'igbinary'
)
)
)
) );
return $cache;
但我得到如下异常。
\Zend\Cache\Storage\Adapter\Filesystem.php:1549
消息:fwrite() 期望参数 2 是字符串,给定对象
\Zend\Cache\Storage\Adapter\Filesystem.php:1553
消息:写入文件时出错 '...\data\cache\zfcache-c0\zfcache-Zend_Paginator_2_722b98872575050f0443b2b626605650.dat'
\Zend\Paginator\Paginator.php:637
消息:生成迭代器时出错