toastnz/dbcache
最新稳定版本:2.0.0
Composer 安装命令:
composer require toastnz/dbcache
包简介
DataObject-based cache for SilverStripe
README 文档
README
DataObject-based cache for SilverStripe.
Requirements
- SilverStripe 4
Installation
composer require toastnz/dbcache
Set the default expiry time in minutes for cache entries
Toast\DBCache\Helpers\DBCache: expiry_minutes: 0
Whether to clear all cached data when ?flush is invoked
Toast\DBCache\Extensions\ControllerDBCacheExtension: clear_on_flush: true
Manipulate cache entries
// Cache "filters" for 10 minutes under the namespace "product" DBCache::set('product.filters', json_encode($products), 10); // Retrieve from cache DBCache::get('product.filters'); // Remove from cache DBCache::clear('product.filters'); // Flush cached data for the "product" namespace DBCache::flush('product'); // Flush all cached data DBCache::flush();
统计信息
- 总下载量: 949
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-12-15