PHPackages                             klavax/laravel-wildcard-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. klavax/laravel-wildcard-cache

ActiveLibrary[Caching](/categories/caching)

klavax/laravel-wildcard-cache
=============================

Cache Wildcard support for Laravel

v1.0.0(6mo ago)0402↑200%MITPHPPHP ^8.2CI passing

Since Nov 7Pushed 6mo agoCompare

[ Source](https://github.com/klAvAx/laravel-wildcard-cache)[ Packagist](https://packagist.org/packages/klavax/laravel-wildcard-cache)[ Docs](https://github.com/klAvAx/laravel-wildcard-cache)[ RSS](/packages/klavax-laravel-wildcard-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

Wildcard for Laravel Cache
--------------------------

[](#wildcard-for-laravel-cache)

[![Unit Tests](https://github.com/klAvAx/laravel-wildcard-cache/workflows/tests/badge.svg)](https://github.com/klAvAx/laravel-wildcard-cache/workflows/tests/badge.svg)[![Packagist License](https://camo.githubusercontent.com/e60623f508586f049d48cfb8396ee411b0c9bc3be174381a1893c37462a3c1e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e63652d4d49542d626c7565)](http://choosealicense.com/licenses/mit/)[![Latest Stable Version](https://camo.githubusercontent.com/a94cb0473e0e4f23f43d8bf8c61970f7b976fc208364f6681afc8ad1b671fc46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6c617661782f6c61726176656c2d77696c64636172642d63616368653f6c6162656c3d537461626c65)](https://packagist.org/packages/klavax/laravel-wildcard-cache)[![Total Downloads](https://camo.githubusercontent.com/05a8f8f785668fcb2639f1ca33114de58482d393b211f2c24d46c63f49b93ec0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6c617661782f6c61726176656c2d77696c64636172642d63616368653f6c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/klavax/laravel-wildcard-cache)

This is a package which adds wildcard support to Laravel Cache by replacing/overriding laravel Cache stores to include wildcard support where applicable.

This package replaces/overrides these Cache Stores:

- ApcStore
- ArrayStore
- DatabaseStore
- SessionStore

This package also adds a new methods which are used behind the scenes to:

- ApcWrapper

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

[](#installation)

Require this package with composer.

```
composer require klavax/laravel-wildcard-cache
```

Also you will probably want to "silence" Ambiguous class resolution warnings and that can be done if you include `exclude-from-classmap` in your composer.json `autoload` section:

```
{
    "autoload": {
        "exclude-from-classmap": [
            "vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php",
            "vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php",
            "vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php",
            "vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php",
            "vendor/laravel/framework/src/Illuminate/Cache/SessionStore.php"
        ]
    }
}
```

Usage
-----

[](#usage)

If you are using `apc`, `array`, `database` or `session` cache stores then now you can use `{any}` token in `Cache::forget` calls like so:

```
Cache::forget("item_{any}");
Cache::forget("someOtherItem_{any}_nested_{any}");
Cache::memo()->forget("this_{any}_works")
```

Extra Info
----------

[](#extra-info)

APCu support is experimental, documentation for it does document an APCUIterator class, but i have not been able to test it successfully...

Star History
------------

[](#star-history)

[![Star History Chart](https://camo.githubusercontent.com/f7c590963371bd42b8840a36a062656203167ed20587b9f6f17e062fc7d9d198/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f7376673f7265706f733d6b6c417641782f6c61726176656c2d77696c64636172642d636163686526747970653d44617465)](https://www.star-history.com/#klAvAx/laravel-wildcard-cache&Date)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance68

Regular maintenance activity

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

187d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ec5e40508cdedfd0b6048106df1cb75caf85d3500450375c81d549cb005d80b?d=identicon)[klavax](/maintainers/klavax)

---

Top Contributors

[![klAvAx](https://avatars.githubusercontent.com/u/600550?v=4)](https://github.com/klAvAx "klAvAx (5 commits)")

---

Tags

laravelcachewildcard

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/klavax-laravel-wildcard-cache/health.svg)

```
[![Health](https://phpackages.com/badges/klavax-laravel-wildcard-cache/health.svg)](https://phpackages.com/packages/klavax-laravel-wildcard-cache)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[omaralalwi/lexi-translate

Laravel translation package with morph relationships and caching.

754.3k2](/packages/omaralalwi-lexi-translate)[suitmedia/laravel-cacheable

Decorate your repositories and make them cacheable

1237.7k](/packages/suitmedia-laravel-cacheable)[karriere/state

Laravel package for storing current application state in cache/session

1718.5k](/packages/karriere-state)[michele-angioni/support

Support is a Laravel package which promotes the use of best practices and design patterns.

181.4k1](/packages/michele-angioni-support)

PHPackages © 2026

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