PHPackages                             sams/url-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. sams/url-cache

ActiveCakephp-plugin[Caching](/categories/caching)

sams/url-cache
==============

CakePHP URL Cache Plugin

040PHP

Since Jul 27Pushed 11y ago1 watchersCompare

[ Source](https://github.com/spandansingh/UrlCache)[ Packagist](https://packagist.org/packages/sams/url-cache)[ RSS](/packages/sams-url-cache/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Description
===========

[](#description)

Whenever you use $this-&gt;Html-&gt;link() in your CakePHP views the Cake Router has to scan through all your routes until it finds a match. This can be slow if you have a lot of links on a page or use a lot of custom routes. By adding this code to your AppHelper the urls are cached, speeding up requests. The cache settings follow the same rules as the other Cake core cache settings. If debug is set to greater than 0 the cache expires in 10 seconds. With debug at 0 the cache is good for 999 days.

Instructions
------------

[](#instructions)

1. Download the plugin to /app/Plugin/UrlCache
2. Put at the top of your app/View/Helper/AppHelper.php

    App::uses('UrlCacheAppHelper', 'UrlCache.View/Helper');
3. Have your AppHelper extend UrlCacheAppHelper instead of Helper

    class AppHelper extends UrlCacheAppHelper { ... }
4. Thats it! Just continue using $this-&gt;Html-&gt;link as you usually do.

By default all the cache will be stored in one file. You can set the option Configure::write('UrlCache.pageFiles', true) and each page will keep a seperate cache. I added this option in the event your site has a ton of unique urls don't want to store them all in one giant cache, which would need to be loaded each request.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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://www.gravatar.com/avatar/3231d38cb58b922fc23223240630ce9041afbc04f84d030a0d8da6ac0a6a1e6c?d=identicon)[spandansingh](/maintainers/spandansingh)

---

Top Contributors

[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (7 commits)")[![josegonzalez](https://avatars.githubusercontent.com/u/65675?v=4)](https://github.com/josegonzalez "josegonzalez (5 commits)")[![mcurry](https://avatars.githubusercontent.com/u/29715?v=4)](https://github.com/mcurry "mcurry (3 commits)")[![Phally](https://avatars.githubusercontent.com/u/112639?v=4)](https://github.com/Phally "Phally (1 commits)")[![spandansingh](https://avatars.githubusercontent.com/u/6729019?v=4)](https://github.com/spandansingh "spandansingh (1 commits)")

### Embed Badge

![Health badge](/badges/sams-url-cache/health.svg)

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

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[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)

PHPackages © 2026

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