PHPackages                             gundars/heartbeat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. gundars/heartbeat

ActiveLibrary[Caching](/categories/caching)

gundars/heartbeat
=================

Cache warms all files found under specified path

0.1.3(9y ago)156MITPHP

Since Nov 12Pushed 9y agoCompare

[ Source](https://github.com/Gundars/heartbeat)[ Packagist](https://packagist.org/packages/gundars/heartbeat)[ RSS](/packages/gundars-heartbeat/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (6)Used By (0)

Heartbeat
=========

[](#heartbeat)

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

[](#install)

```
composer require gundars/heartbeat ~0.1

```

### Call in CLI

[](#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

[](#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

[](#manual-loading)

```
