PHPackages                             perturbatio/wildcache - 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. perturbatio/wildcache

ActiveLibrary[Caching](/categories/caching)

perturbatio/wildcache
=====================

v2.0.4(3y ago)22.1k1MITPHPCI failing

Since Apr 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Perturbatio/WildCache)[ Packagist](https://packagist.org/packages/perturbatio/wildcache)[ RSS](/packages/perturbatio-wildcache/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (10)Used By (0)

WildCache
=========

[](#wildcache)

[![CircleCI](https://camo.githubusercontent.com/23671e5e05dd3285d04fcc52207099857f33df233b93dba2618fd74283996b08/68747470733a2f2f636972636c6563692e636f6d2f67682f506572747572626174696f2f57696c6443616368652f747265652f6d61737465722e7376673f7374796c653d736869656c64)](https://circleci.com/gh/Perturbatio/WildCache/tree/master)[![Latest Stable Version](https://camo.githubusercontent.com/5ac4fe8d1ac2d5431f791d500110895d1291d6302a4940cfd043a10c823adc9c/68747470733a2f2f706f7365722e707567782e6f72672f706572747572626174696f2f57696c6443616368652f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/perturbatio/WildCache)[![Latest Unstable Version](https://camo.githubusercontent.com/cd1f97b80e007a395064970eac7f63a3f178644837c38e0cc101127d6ac1de0c/68747470733a2f2f706f7365722e707567782e6f72672f706572747572626174696f2f77696c6463616368652f762f756e737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/perturbatio/wildcache)[![License](https://camo.githubusercontent.com/b35ad5e27dc68f3b8479299d9b2bc08a3653a56c680559d926e0bcab0fe9bd57/68747470733a2f2f706f7365722e707567782e6f72672f706572747572626174696f2f77696c6463616368652f6c6963656e73653f666f726d61743d666c6174)](https://packagist.org/packages/perturbatio/wildcache)[![Total Downloads](https://camo.githubusercontent.com/1e5d390cf04a5de9e65de712366daf6c62fd3f3b12768c759852852a9b825046/68747470733a2f2f706f7365722e707567782e6f72672f706572747572626174696f2f77696c6463616368652f646f776e6c6f6164733f666f726d61743d666c6174)](https://packagist.org/packages/perturbatio/wildcache)

Adds the ability to find or remove items in the Laravel cache by wildcard.

Usage
-----

[](#usage)

Using WildCache, you can store items using a `dot.notation` syntax, then retrieve the item matching to get or remove all items matching a pattern.

Methods
-------

[](#methods)

### Put - Write a value to cache

[](#put---write-a-value-to-cache)

```
/** @var \Perturbatio\WildCache\WildCache $wildCache */
$wildCache = app('wildcache');
// use the WildCache to store the item with a dot separated key
$wildCache->put('test.WildCache.itemA', 9999, now()->addMinutes(10));
$wildCache->put('test.WildCache.itemB', 8888, now()->addMinutes(10));
```

### Get

[](#get)

The get method always returns a collection of any items that match the pattern, or the default value passed in (defaults to `null`)

```
/** @var \Perturbatio\WildCache\WildCache $wildCache */
$wildCache = app('wildcache');
// returns the first item that has a key prefixed with `test.WildCache.`
echo $wildCache->get('test.WildCache.*')->first();
```

```
/** @var \Perturbatio\WildCache\WildCache $wildCache */
$wildCache = app('wildcache');
echo $wildCache->get('some.key', 'default_value')->first();
```

```
/** @var \Perturbatio\WildCache\WildCache $wildCache */
$wildCache = app('wildcache');

// use the WildCache to store the item with a dot separated key
$wildCache->put('test.WildCache.itemA', 9999, now()->addMinutes(10));
$wildCache->put('test.WildCache.itemB', 8888, now()->addMinutes(10));

// retrieve the first that matches the key
echo $wildCache->get('test.WildCache.*')->first(); // 9999
echo $wildCache->get('test.WildCache.*')->get('wildcache.test.itemB');
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% 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 ~245 days

Recently: every ~165 days

Total

6

Last Release

1358d ago

Major Versions

v1.0.0 → v2.0.02020-11-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c5491ccf25e38ee611ef0a94231e8de7086a6419b0674bcaf448fbd0008001a?d=identicon)[Perturbatio](/maintainers/Perturbatio)

---

Top Contributors

[![Perturbatio](https://avatars.githubusercontent.com/u/1007702?v=4)](https://github.com/Perturbatio "Perturbatio (22 commits)")[![victor-priceputu](https://avatars.githubusercontent.com/u/33457989?v=4)](https://github.com/victor-priceputu "victor-priceputu (1 commits)")

---

Tags

laravelcachewildcard

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/perturbatio-wildcache/health.svg)

```
[![Health](https://phpackages.com/badges/perturbatio-wildcache/health.svg)](https://phpackages.com/packages/perturbatio-wildcache)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[dragon-code/laravel-cache

An improved interface for working with cache

6844.8k10](/packages/dragon-code-laravel-cache)[nexxai/laravel-cfcache

A handful of Cloudflare cache helpers for Laravel

1317.7k](/packages/nexxai-laravel-cfcache)[omaralalwi/lexi-translate

Laravel translation package with morph relationships and caching.

754.3k2](/packages/omaralalwi-lexi-translate)[michele-angioni/support

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

181.4k1](/packages/michele-angioni-support)[makbulut/laravel-aerospike

Aerospike cache driver for Laravel

102.2k](/packages/makbulut-laravel-aerospike)

PHPackages © 2026

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