- How do I install torann/taggable-file-cache?
- Install it with Composer, publish the package configuration, and select the cache driver it registers for the store you want to use. The integration surface is small: one driver registration plus a config entry. Because the last release is from 2018, check compatibility with your Laravel version before adding it to composer.json.
- Does torann/taggable-file-cache work with Laravel 10 or Laravel 11?
- There is no official support for modern Laravel versions; the last release is 1.0.0 from 2018, in the Laravel 5.5/5.6 era. Composer is likely to report illuminate/* constraint conflicts, so run composer why-not torann/taggable-file-cache against your app. The practical path is usually to fork it with widened constraints or vendor the store class.
- How does tag-based cache invalidation work with the file driver?
- The package extends Laravel's native file cache store and maintains per-tag index files so entries can be grouped and flushed together. When you flush a tag, it uses that index to invalidate the related entries instead of clearing the whole file cache. This keeps tag behaviour familiar through Laravel's Cache API, but the index files need locking discipline under concurrent writes.
- Can I use Cache::tags() with Laravel's file cache store without Redis?
- Yes, that is the package's purpose: it makes the filesystem store taggable so you can call Cache::tags([...]) without switching to Redis or Memcached. The call sites remain framework-native, which preserves an exit path to Redis later. The trade-off is that tag invalidation is local to each node's filesystem.
- Is torann/taggable-file-cache suitable for production?
- Only with clear constraints. It has had no releases for roughly seven years, has very little adoption, and is likely incompatible with current Laravel without a fork. The file store is node-local, so tag flushes do not propagate across horizontally scaled nodes. Use it only on single-node or sticky deployments, with regenerable cached data and a named internal owner.
- What happens to tag flushes in a multi-server or container deployment?
- File cache lives on each node's local filesystem, so a tag flush on node A does not invalidate matching entries on node B. Under autoscaling or containers this becomes a silent, user-visible correctness bug rather than a performance issue. If you scale horizontally, use a shared taggable store such as Redis or Memcached instead.
- How should I test tag flushing and concurrency with this package?
- Add integration tests for parallel writes and tag flushes, because racing tag-index updates can orphan entries, leave stale cache, or invalidate prematurely. Also test cache:clear, deploy-time cache wipes, file permission changes, and Octane worker lifetimes. Assert that a flushed tag is not served again on the same node and that unrelated tags remain intact.
- What are the alternatives to torann/taggable-file-cache for taggable caching?
- Use Laravel's Redis or Memcached stores if you need real tag support shared across nodes, or the database store where it fits your constraints. For simpler cases, key-versioning or namespace prefixes can replace tag invalidation more cheaply than adding a driver. You can also reimplement the per-tag index pattern in-house, which is close in scope to forking this package.
- How do I configure the taggable file cache driver and manage tag index growth?
- Publish the package config, choose the driver for the relevant cache store, and ensure the filesystem path is writable by the application. Tag index files accumulate on disk, so plan a cleanup policy or periodic cache clears to stop unbounded growth. Monitor disk usage and include index cleanup in your deploy or maintenance runbook.
- Is torann/taggable-file-cache maintained, and can I fork or vendor it?
- The package is effectively unmaintained: the last release is 1.0.0 from February 2018, with a single author, very few stars, and no visible fallback maintainer. It uses a permissive BSD-2-Clause licence, so forking or vendoring the store class with attribution is feasible. If you adopt it, pin an exact version or commit SHA and add internal tests before relying on it.