PHPackages                             sylweriusz/webcache-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. sylweriusz/webcache-middleware

ActiveLibrary[Caching](/categories/caching)

sylweriusz/webcache-middleware
==============================

Static aka Html pages cache for Slim3 middleware stack

0.7.0(5y ago)0115GPL-3.0PHPPHP &gt;=5.5.0

Since Apr 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sylweriusz/webcache-middleware)[ Packagist](https://packagist.org/packages/sylweriusz/webcache-middleware)[ RSS](/packages/sylweriusz-webcache-middleware/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (1)Versions (21)Used By (0)

webcache-middleware
===================

[](#webcache-middleware)

Static pages cache for Slim3 middleware stack

WebCache will save only GET request with status 200.

Install
-------

[](#install)

```
$ composer require sylweriusz/webcache-middleware
```

Usage
-----

[](#usage)

Declare middleware

```
$app->add(new \Slim\Middleware\WebcacheRedis('192.168.1.12:6379'));
```

Cache will try to detect ID of document, first numerical value in url parts.

Example: after detection ID = 123456

and if it fail to detect it will assume ID = 0

if You want to delete all articles with this ID You should do something like this

```
$webcache = new \Slim\Middleware\WebcacheRedis('192.168.1.12:6379');
$webcache->delete(123456);
```

Disabling cache inside application route

```
\Slim\Middleware\WebcacheRedis::setTtl(0);
```

Change default TTL (in seconds) inside application route

```
\Slim\Middleware\WebcacheRedis::setTtl(600);
```

Smarty plugin
-------------

[](#smarty-plugin)

Define parts of html that should be always fresh, no mather what.

```

{fresh id="reusable_box"}some html content{/fresh}

```

You can even declare them empty (as readonly) on another page and hope it will just work.

```

{fresh id="reusable_box" readonly=1}{/fresh}

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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

Recently: every ~251 days

Total

20

Last Release

1911d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cfd00bf6abce1b475ddb389653ea8e714cd9b65feec00326e9431ffda127847?d=identicon)[sylweriusz](/maintainers/sylweriusz)

---

Top Contributors

[![sylweriusz](https://avatars.githubusercontent.com/u/8569439?v=4)](https://github.com/sylweriusz "sylweriusz (57 commits)")

---

Tags

middlewareslimrediscachewebcache

### Embed Badge

![Health badge](/badges/sylweriusz-webcache-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/sylweriusz-webcache-middleware/health.svg)](https://phpackages.com/packages/sylweriusz-webcache-middleware)
```

###  Alternatives

[rediska/rediska

Full-featured PHP client for key-value database Redis

258241.4k1](/packages/rediska-rediska)[cache/redis-adapter

A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags

523.9M27](/packages/cache-redis-adapter)[kdyby/redis

Redis storage for Nette Framework

491.6M2](/packages/kdyby-redis)[abouvier/slim-redis-cache

Redis cache middleware for Slim framework

172.0k](/packages/abouvier-slim-redis-cache)[matomo/cache

PHP caching library based on Doctrine cache

38854.1k4](/packages/matomo-cache)[ihor/cachalot

Cache a lot in a proper way (APC, XCache, Memcached, Redis, Couchbase)

2528.1k](/packages/ihor-cachalot)

PHPackages © 2026

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