rollerworks / cache-bundle
此包已被废弃,不再维护。未建议替代包。
Rollerworks Session Cache 的 Symfony 集成包
v1.2.0
2015-12-05 13:11 UTC
Requires
- php: >=5.3.3
- rollerworks/cache: ~1.2
- symfony/framework-bundle: ~2.3|~3.0
This package is not auto-updated.
Last update: 2022-02-01 12:22:22 UTC
README
此包集成了 Rollerworks Cache 组件到您的 Symfony 应用程序中。
Rollerworks Cache 组件为 Doctrine Common 提供了一个基于 Session 的缓存驱动器。(缓存数据存储在会话中)。
安装
RollerworksCacheBundle 使用 Composer 管理其依赖项。
如果您还没有 Composer,请按照 https://getcomposer.org.cn/ 上的说明下载。
然后使用以下命令将 rollerworks/cache-bundle
包添加到您的 composer.json 中:
$ composer require "rollerworks/cache-bundle"
现在,Composer 将自动下载所有必需的文件,并为您安装它们。接下来,您需要更新您的 AppKernel.php
文件,并注册新的包。
<?php // in AppKernel::registerBundles() $bundles = array( // ... new Rollerworks\Bundle\CacheBundle\RollerworksCacheBundle(), // ... );
配置包
该包默认已配置,可直接使用。但为了清晰起见,请在您的配置文件中添加以下内容:
# app/config/config.yml rollerworks_cache: session: # Storage key that used for storing the session storage_key: _rollerworks_cache # Session-bag name bag_name: cache
恭喜!您已准备好!
You can get the session-storage Cache-Driver service with
"rollerworks_cache.driver.session_driver".
资源
此组件采用 MIT 许可证发布。