定制 mmoreram/cache-flush-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mmoreram/cache-flush-bundle

最新稳定版本:v1.0.1

Composer 安装命令:

composer require mmoreram/cache-flush-bundle

包简介

Symfony cache flusher

README 文档

README

Build Status

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-12