教义缓存Symfony2 deleteByPrefix [英] Doctrine Cache Symfony2 deleteByPrefix

查看:104
本文介绍了教义缓存Symfony2 deleteByPrefix的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想删除所有以字符串为前缀的缓存条目,但是我的代码返回:

 致命错误:调用到未定义的方法Doctrine\Common\Cache\FilesystemCache :: deleteByPrefix()

和我的代码是

  $ deleted = $ cachemanager-> deleteByPrefix('catalog_'); 

就像我在哪里检查过:进入学说的文档 http://docs.doctrine-project.org/projects/doctrine-orm/en/ $ / $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$吹吹灭的情况下,控制器中的所有资源被清除的情况下。
$ b

有人代替此方法'deleteByPrefix()'吗?

最后,我来使用Zend Framework缓存捆绑包,该捆绑包允许通过前缀删除...


I would like to delete all my cache entries prefixed by a string, but my code returns :

Fatal error: Call to undefined method Doctrine\Common\Cache\FilesystemCache::deleteByPrefix()

and my code is

$deleted = $cachemanager->deleteByPrefix('catalog_');

like where I checked : into the documentation of doctrine http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html#deleting.

I need to clear the cache since controller, not from CLI...

Does someone as an alternative to this method 'deleteByPrefix()' ?

解决方案

Finally, I come to use the Zend Framework cache bundle, who permit to delete by prefix...

这篇关于教义缓存Symfony2 deleteByPrefix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆