prowebcraft/yii2-lazy-cache
Composer 安装命令:
composer require prowebcraft/yii2-lazy-cache
包简介
Lazy cache functions
README 文档
README
Lazy cache functions
Usage
Attach Lazy trait to your class
<?php class HeavyJob { use \prowebcraft\yii2lazycache\Lazy; }
Wrap heavy data in lazy function
$rocketToMarsTrajectory = $this->lazyWithCache('mars.trajectory', function() { // this function will be called once a day $trajectory = null; // heavy calculation here return $trajectory; });
统计信息
- 总下载量: 1.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-4-Clause
- 更新时间: 2022-05-04