dracoblue/doctrine-cache-profile-storage
Composer 安装命令:
composer require dracoblue/doctrine-cache-profile-storage
包简介
Use a Doctrine Cache as ProfilerStorageInterface for Symfonys Web Profiler.
关键字:
README 文档
README
By default the profiler for symfony stores it's data in file storage. If you want to use memcached or redis instead, you need a ProfileStorageInterface for this.
This library provides a simple Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface
for any Doctrine\Common\Cache\CacheProvider.
Use Redis
Given:
- REDIS_HOST and REDIS_PORT are set as environment variables. You might use parameters instead, too.
- And redis extension is installed
app.profiler.redis: class: \Redis calls: - [ pconnect, [ '%env(REDIS_HOST)%', '%env(REDIS_PORT)%' ]] app.profiler.redis_cache: class: Doctrine\Common\Cache\RedisCache calls: - [ setNamespace, [ "profiler-" ]] - [ setRedis, [ "@app.profiler.redis" ]] profiler.storage: class: DracoBlue\DoctrineCacheProfileStorage\DoctrineCacheProfileStorage arguments: - "@app.profiler.redis_cache"
Use Memcached
Given:
- MEMCACHED_HOST and MEMCACHED_PORT are set as environment variables. You might use parameters instead, too.
- And memcached extension is installed
app.profiler.memcached: class: \Memcached arguments: - "profiler" calls: - [ addServer, [ '%env(MEMCACHED_HOST)%', '%env(MEMCACHED_PORT)%' ]] app.profiler.memcached_cache: class: Doctrine\Common\Cache\MemcachedCache calls: - [ setMemcached, [ "@app.profiler.memcached" ]] profiler.storage: class: DracoBlue\DoctrineCacheProfileStorage\DoctrineCacheProfileStorage arguments: - "@app.profiler.memcached_cache"
License
This work is copyright by DracoBlue (http://dracoblue.net) and licensed under the terms of MIT License.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-17