PHPackages                             buzzingpixel/static-cache-middleware - 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. buzzingpixel/static-cache-middleware

AbandonedArchivedLibrary[Caching](/categories/caching)

buzzingpixel/static-cache-middleware
====================================

1.0.1(4y ago)0417Apache-2.0PHPPHP ^8.0

Since Oct 19Pushed 4y agoCompare

[ Source](https://github.com/buzzingpixel/static-cache-middleware)[ Packagist](https://packagist.org/packages/buzzingpixel/static-cache-middleware)[ RSS](/packages/buzzingpixel-static-cache-middleware/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (14)Versions (3)Used By (0)

Static Cache Middleware Changelog
=================================

[](#static-cache-middleware-changelog)

Very often, entire page responses can be cached the first time it is loaded and that cache can subsequently be served instead of building the page from the various PHP and Database components on the next request. While this sort of cache can be accomplished in a variety of ways, this package does it through a PSR middleware. There are currently also two drivers available: Redis and File. You can also implement the CacheApiContract to provide your own.

Here's how to use it:
---------------------

[](#heres-how-to-use-it)

1. In your project, run `composer require buzzingpixel/static-cache-middleware`
2. Configure your DI to serve the StaticCacheMiddleware with the two constructor parameters of whether to enable the static cache at all (this is nice for passing in an env variable), and the driver you wish to use. See the [examples](/examples).
3. When crafting a response, set `EnableStaticCache` to string of `'true'`.

```
$response = $this->responseFactory->createResponse()
    ->withHeader('EnableStaticCache', 'true');
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~10 days

Total

2

Last Release

1708d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/27433694?v=4)[BuzzingPixel, LLC](/maintainers/buzzingpixel)[@buzzingpixel](https://github.com/buzzingpixel)

---

Top Contributors

[![tjdraper](https://avatars.githubusercontent.com/u/3803475?v=4)](https://github.com/tjdraper "tjdraper (12 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/buzzingpixel-static-cache-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/buzzingpixel-static-cache-middleware/health.svg)](https://phpackages.com/packages/buzzingpixel-static-cache-middleware)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[spiral/framework

Spiral, High-Performance PHP/Go Framework

2.1k2.2M66](/packages/spiral-framework)[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.5k1.5M88](/packages/mcp-sdk)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)

PHPackages © 2026

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