gundars/heartbeat
Composer 安装命令:
composer require gundars/heartbeat
包简介
Cache warms all files found under specified path
README 文档
README
Heartbeat helps with:
- slow file reads on cloud hostings where cache is not on the same storage as application (Azure);
- slow file includes from composer;
Heartbeat finds all the files in your application, includes and "cache" warms
Best performance calling Heartbeat every 5 minutes having application + vendors under 20 000 files
Install
composer require gundars/heartbeat ~0.1
Call in CLI
> php vendor/gundars/heartbeat/load.php
Scanning /var/www/public/zend/approot
10102 files loaded in: 0h 2m 49s
Call with input parameter
Paste this code in your index.php:
use Heartbeat\Heartbeat;
if (array_key_exists('heartbeat', $_REQUEST)) {
$heartBeat = new Heartbeat();
$heartBeat->load(__DIR__);
}
and call via http(s) http://example.com/?heartbeat=true
Manual Loading
<?php
use Heartbeat\Heartbeat;
$heartBeat = new Heartbeat();
$heartBeat->->load(__DIR__ . '/../../../');
Verbose
Prints all included files
$heartBeat->verbose()->load(__DIR__);
Die
stops script execution after file include is finished
$heartBeat->verbose()->load(__DIR__, true);
统计信息
- 总下载量: 56
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-12