mmoreram/cache-flush-bundle
最新稳定版本:v1.0.1
Composer 安装命令:
composer require mmoreram/cache-flush-bundle
包简介
Symfony cache flusher
关键字:
README 文档
README
Flush all your kernel content with a simple Symfony service.
$this ->container ->get('cache_flusher') ->flushCache()
by default the service will flush the cache of the kernel loaded in the framework, but you can explicitly flush one kernel's cache by passing the kernel as the first and unique method's parameter.
$myOtherKernel = // $this ->container ->get('cache_flusher') ->flushCache($myOtherKernel)
You can inject the service as well.
my_service: class: MyService\Namespace arguments: '@cache_flusher'
The service dispatches as well two events, one just before flush the kernel's
cache, and another one just after. In both cases, an instance of
CacheFlushEvent is dispatched, with the used kernel inside.
my_event_listener:
class: MyEventListener\Namespace
tags:
- { name: kernel.event_listener, event: cache.pre_flush }
- { name: kernel.event_listener, event: cache.on_flush }
统计信息
- 总下载量: 18.52k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-12