PHPackages                             learnzf2/route-cache - 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. learnzf2/route-cache

ActiveLibrary[Caching](/categories/caching)

learnzf2/route-cache
====================

More speed with Cache Routing. This module is part of the Learn ZF2 book

82.4k2[2 issues](https://github.com/slaff/learnzf2-route-cache/issues)PHP

Since Oct 13Pushed 10y ago3 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Simple module that speeds up the route matching using caching.

This module is part of the "Learn ZF2" book () that can help you learn Zend Framework 2 (ZF2) and improve the performance of your ZF2 application.

We have noticed that in real world applications routing can take 300 ms or more. With this module the routing can take less than 40 ms.

Installation
------------

[](#installation)

Run the following command from the root folder of your ZF2 application.

```
php composer.phar require learnzf2/route-cache:dev-master

```

Setup
-----

[](#setup)

First: To enable the module make sure to add it to the list of modules in your config/application.config.php.

Second: This module requires a cache service that is called "var-cache". The cache service should be able to store variables. If you already have such a service but it has a different name then you can use aliases in the service\_manager section of your application configuration. This can be achieved by adding the following lines:

```
'service_manager' = array(
     // ...
     'aliases' => array (
     	// ...
     	'var-cache' => ''
     )
),

```

If you don't have a cache service in your application then copy the file vendor/learnzf2/route-cache/config/cache.local.php.dist to config/autoload/cache.local.php.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/247452?v=4)[slaff](/maintainers/slaff)[@slaff](https://github.com/slaff)

### Embed Badge

![Health badge](/badges/learnzf2-route-cache/health.svg)

```
[![Health](https://phpackages.com/badges/learnzf2-route-cache/health.svg)](https://phpackages.com/packages/learnzf2-route-cache)
```

###  Alternatives

[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)[cheprasov/php-redis-client

Php client for Redis. It is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 6.0

1281.2M21](/packages/cheprasov-php-redis-client)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)

PHPackages © 2026

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