PHPackages                             paneidos/laravel-tagged-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. paneidos/laravel-tagged-cache

ActiveLibrary[Caching](/categories/caching)

paneidos/laravel-tagged-cache
=============================

Force a tag on your cache, allowing you to share memcache instances.

v1.3.0(5y ago)05.2kMITPHPPHP &gt;= 7.3CI failing

Since May 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/paneidos/laravel-tagged-cache)[ Packagist](https://packagist.org/packages/paneidos/laravel-tagged-cache)[ RSS](/packages/paneidos-laravel-tagged-cache/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

[![build status](https://camo.githubusercontent.com/8e07cdd1025d4d0655d3e2583cb9d717b46e8662bf0f91d1925b020604721a96/68747470733a2f2f6170692e7472617669732d63692e6f72672f70616e6569646f732f6c61726176656c2d7461676765642d63616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/paneidos/laravel-tagged-cache)

Laravel Tagged Cache
====================

[](#laravel-tagged-cache)

Force a certain tag on your cache.

Why would I need this?
----------------------

[](#why-would-i-need-this)

If you use the same Memcache server for multiple projects/tenants, it might be difficult to flush the cache for only one of them. The only options is to flush the entire cache. Using Laravel's built in `TaggableStore`, it's possible to flush the cache for only one project/tenant.

How does it work?
-----------------

[](#how-does-it-work)

The tagged cache driver is a simple wrapper for another cache driver. All regular access to cache keys, such as `get`, `put` and `remember`, are forced to use the `tags` method and include the specified tag. Other special methods, such as `lock` are passed through without modification.

Installation
============

[](#installation)

To get started with Laravel Tagged Cache, use Composer to add the package to your project's dependencies:

```
composer require paneidos/laravel-tagged-cache

```

Config
------

[](#config)

Specify a tagged store in your `config/cache.php`:

```
return [
    'stores' => [
        'memcache-tagged' => [
            'driver' => 'tagged',
            'backend' => 'memcache',
            'tag' => 'project_name',
        ],
        'memcache' => [
            // ...
        ],
        // ...
    ],
];
```

Example: replace your default store
-----------------------------------

[](#example-replace-your-default-store)

```
return [
    'default' => 'tagged',

    'stores' => [
        'tagged' => [
            'driver' => 'tagged',
            'backend' => env('CACHE_DRIVER', 'array'),
            // Use the database name as the forced tag
            'tag' => env('DB_DATABASE', 'none'),
        ],
        // ...
    ],
];
```

Compatibility
=============

[](#compatibility)

Currently works with Laravel 5.6 and higher. The backend can be any store with support for tags. Note: the file store does *not* support tags.

Development
===========

[](#development)

```
# Install dependencies
composer install
# Run tests
composer test
# Run tests & report coverage
composer test -- --coverage-text

```

Contributing
============

[](#contributing)

Send a pull request, ensure you've got test coverage for the new code.

License
=======

[](#license)

Laravel Tagged Cache is licensed under the MIT License.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

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

Total

4

Last Release

2063d ago

PHP version history (2 changes)v1.0.0PHP &gt;= 7.1

v1.3.0PHP &gt;= 7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/d778810fa2f292d37530eb69c9fdac13171e5d917107f7f58f63bb1d2fdf9f19?d=identicon)[paneidos](/maintainers/paneidos)

---

Top Contributors

[![paneidos](https://avatars.githubusercontent.com/u/125766?v=4)](https://github.com/paneidos "paneidos (19 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/paneidos-laravel-tagged-cache/health.svg)

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

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[genealabs/laravel-model-caching

Automatic caching for Eloquent models.

2.4k4.8M26](/packages/genealabs-laravel-model-caching)[mikebronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k127.1k1](/packages/mikebronner-laravel-model-caching)[laragear/cache-query

Remember your query results using only one method. Yes, only one.

272122.8k](/packages/laragear-cache-query)[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

2057.2k](/packages/iazaran-smart-cache)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k2.0k1](/packages/mike-bronner-laravel-model-caching)

PHPackages © 2026

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