microweber-packages / microweber-taggable-file-cache
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
pkg:composer/microweber-packages/microweber-taggable-file-cache
Requires
- php: ^8.1
- illuminate/cache: ^10.0|^11.0|^12.0|^13.0
- illuminate/contracts: ^10.0|^11.0|^12.0|^13.0
- illuminate/filesystem: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- microweber-packages/microweber-package: *
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0|^10.0|^11.0
- phpunit/phpunit: ^10.0|^11.0|^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
- microweber-packages/taggable-file-cache: *
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