PHPackages                             ryssbowh/php-cache-warmer - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. ryssbowh/php-cache-warmer

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ryssbowh/php-cache-warmer
=========================

An asynchronous php cache warmer

1.0.1(5y ago)770.0k↓36.7%1MITPHPPHP &gt;=7.0

Since Jan 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ryssbowh/php-cache-warmer)[ Packagist](https://packagist.org/packages/ryssbowh/php-cache-warmer)[ RSS](/packages/ryssbowh-php-cache-warmer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (1)

Php Cache Warmer
================

[](#php-cache-warmer)

Simple php cache warmer, add urls or parse sitemap and visits all the urls asynchronously. You need to wait for the promise returned by the `warm` method to finish :

```
use Ryssbowh\PhpCacheWarmer\Warmer;

$warmer = new Warmer();
$warmer->parseSitemap('http://mysite.com/sitemap.xml')
	->addUrls('http://othersite.com')
	->addUrls([
		'http://othersite.com/blog',
		'http://othersite.com/hello'
	])
	->ignoreUrls('http://mysite.com/page-503')
	->ignoreUrls([
		'http://mysite.com/page-400',
		'http://mysite.com/page-500'
	])
	->ignoreRegexs('/http:\/\/mysite\.com\/page*/')
	->ignoreRegexs([
		'/http:\/\/mysite\.com\/forum*/',
		'/http:\/\/mysite\.com\/blog*/'
	]);
$warmer->warm()->wait();

```

You can define the amount of concurrent requests (default 25) :

```
$warmer = new Warmer(50);

```

You can pass guzzle options in the constructor :

```
$warmer = new Warmer(25, ['headers' => [
	'User-Agent' => $_SERVER['HTTP_USER_AGENT'],
]]);

```

And subscribe an observer which will be called for every successful and failed requests :

```
use Ryssbowh\PhpCacheWarmer\Warmer;
use Ryssbowh\PhpCacheWarmer\Observer;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\Response;

class MyObserver implements Observer
{
	public function onFulfilled(Response $response, string $url)
	{
		echo 'visited '.$url;
	}

	public function onRejected(RequestException $reason, string $url)
	{
		echo 'failed '.$url.' with code '.$reason->getResponse()->getStatusCode();
	}
}

$warmer = new Warmer(25, [], new MyObserver);

```

Thanks to the great [vipnytt/sitemapparser](https://github.com/VIPnytt/SitemapParser) sitemap parser :)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

1940d ago

Major Versions

0.2.0 → 1.0.02021-01-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6736613?v=4)[The Web Puzzlers](/maintainers/ryssbowh)[@ryssbowh](https://github.com/ryssbowh)

---

Tags

Guzzlecachingcache warmer

### Embed Badge

![Health badge](/badges/ryssbowh-php-cache-warmer/health.svg)

```
[![Health](https://phpackages.com/badges/ryssbowh-php-cache-warmer/health.svg)](https://phpackages.com/packages/ryssbowh-php-cache-warmer)
```

###  Alternatives

[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

43417.4M104](/packages/kevinrob-guzzle-cache-middleware)[eightpoints/guzzle-bundle

Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony. Comes with easy and powerful configuration options and optional plugins.

45912.1M55](/packages/eightpoints-guzzle-bundle)[guzzlehttp/oauth-subscriber

Guzzle OAuth 1.0 subscriber

24114.5M141](/packages/guzzlehttp-oauth-subscriber)[caseyamcl/guzzle_retry_middleware

Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts

21810.7M64](/packages/caseyamcl-guzzle-retry-middleware)[php-http/guzzle7-adapter

Guzzle 7 HTTP Adapter

9157.1M555](/packages/php-http-guzzle7-adapter)[graham-campbell/guzzle-factory

Provides A Simple Guzzle Factory With Good Defaults

916.4M49](/packages/graham-campbell-guzzle-factory)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
