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

ActiveLibrary[Caching](/categories/caching)

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

1.0.1(4y ago)0318Apache-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 1mo ago

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 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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

1662d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3749c595e494c26b1d9772c64f126c2f64f0d5057736dc5986d2f305432896ba?d=identicon)[buzzingpixel](/maintainers/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.8k18.5M1.6k](/packages/cakephp-cakephp)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[windwalker/framework

The next generation PHP framework.

25639.1k1](/packages/windwalker-framework)[eliashaeussler/typo3-warming

Warming - Warms up Frontend caches based on an XML sitemap. Cache warmup can be triggered via TYPO3 backend or using a console command. Supports multiple languages and custom crawler implementations.

20229.9k](/packages/eliashaeussler-typo3-warming)

PHPackages © 2026

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