A Laravel file cache driver that supports tagging.

1.0.0 2018-02-16 15:57 UTC

This package is auto-updated.

Last update: 2024-05-08 09:19:08 UTC


Latest Stable Version Total Downloads

A Laravel file cache driver that supports tagging.



From the command line run:

$ composer require torann/taggable-file-cache

The Service Provider

Open up config/app.php and find the providers key.

'providers' => [




In your config\cache.php, create a new store:

'tagged_file' => [
    'driver' => 'tagged_file',
    'path' => storage_path('framework/cache'),

Optional Configuration

  • queue: accepts the string name of a queue to use during garbage collection, will use the default queue if omitted.
  • separator: defines the separator character or sequence to be used internally, this should be chosen to never collide with a key value (default ~#~)

Garbage Collection

To offset the work of cleaning up cache entries when a tag is flushed this task is added as a Job and queued using laravel's inbuilt queueing.

Note: laravel's default queue driver is sync which will result in the job being executed synchronously, it is strongly advised you use an alternate queue driver with appropriate workers to offset this work if you wish to use this cache driver.