Search by

microweber-packages / microweber-taggable-file-cache

boksiora

Taggable File Cache driver for Laravel. Allows the use of Cache tags with a file-based cache driver. Supports multi-site environments via the --env flag.

Package info

github.com/microweber-packages/microweber-taggable-file-cache

Homepage

pkg:composer/microweber-packages/microweber-taggable-file-cache

Statistics

Installs: 34

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-03 11:17 UTC

This package is auto-updated.

Last update: 2026-11-03 15:26:42 UTC


README

A custom file cache driver for Laravel that supports Cache Tags with a file-based cache store. Works standalone in any Laravel project.

Installation

composer require microweber-packages/microweber-taggable-file-cache

The service provider is auto-discovered. If you need to register it manually:

'providers' => [
    // ...
    MicroweberPackages\TaggableFileCache\TaggableFileCacheServiceProvider::class,
];

Usage

The package overrides the default file cache driver to support tags:

use Illuminate\Support\Facades\Cache;

// Put with tags
Cache::tags(['people', 'artists'])->put('firstName', 'Peter', now()->addMinutes(9));

// Get with tags
$name = Cache::tags('people')->get('firstName');

// Flush specific tags
Cache::tags(['people', 'artists'])->flush();

// Flush all
Cache::flush();

Multi-Site Environment Support

Cache is automatically scoped per environment. To clear cache for a specific environment:

php artisan cache:clear-taggable-file --env=production
php artisan cache:clear-taggable-file --env=staging

License

MIT