我正在使用 bramstroker 的StrokerCache Zend Framework 2 模块,该模块本身使用 Zend\Cache 并具有方法clearByTags()。
如果我想清除缓存,以下工作正常:
public function fooAction()
{
$cs = $this->getServiceLocator()->get('strokercache_service');
var_dump($cs->clearByTags(array(
'controller_ClientCms\Controller\Cms'
)));
}
但是,如果我想包含参数怎么办?
$cs->clearByTags(array(
'controller_ClientCms\Controller\Cms,param_action:index,param_client:foo'
));
...不起作用。
缓存目录中的标记文件如下所示:
strokercache_route_home/client
strokercache_controller_ClientCms\Controller\Cms
strokercache_param_action_index
strokercache_param_client_foo