swayok/alternative-laravel-cache
Alternative cache driver for Laravel that brings reliable tag support to any store—file, database, Redis, or Memcached—so you can group and invalidate keys without the limitations of Laravel's built-in tagged cache. Drop-in replacement with a familiar Cache::tags() API.
config('cache.serializable_classes') for file, Redis, and Memcached stores, plus a non-Laravel serializable_base_classes fallback for teams that can't maintain an explicit allowlist. This is a hardening surface: lock payloads that get serialized/unserialized can now be constrained to known classes. If you handle tenant-supplied or webhook-supplied data inside locked sections, this is a direct risk-reduction input — and the serializable_base_classes escape hatch means adoption isn't blocked on enumerating every class up front.Filesystem instead of Flysystem, and previously missing store methods are now implemented. Net effect for roadmap purposes: the package is tracking the framework's own store implementations more closely, so the cost of staying current on Laravel is trending down, not up.Adopt when:
Cache::lock() plumbing scattered across the codebase.serializable_classes / serializable_base_classes) rather than accepting whatever the cache driver will unserialize.Look elsewhere when:
withoutOverlapping) already covers it — this is unnecessary dependency surface.CanFlushLocks in 6.3.3; 6.4.0 adds store methods to mirror native Laravel stores, which may close that gap, but it isn't stated explicitly — verify before depending on it.Flysystem-specific behavior for file-backed locks. 6.4.0 swaps the file store onto Laravel's Filesystem, so any assumption about adapter paths, visibility, or streams should be re-tested.Verification before adoption (specific to this release):
Flysystem → Filesystem is intended to match Laravel, but your deployment's path semantics are the thing that breaks.serializable_classes is honored on your configured store, and decide explicitly whether to set serializable_base_classes. Prefer the explicit allowlist; the base-classes fallback is broader and should be a documented, deliberate choice, not a default.CanFlushLocks isn't implemented, and check whether the new store methods change the answer.For executives (one paragraph): We evaluated this package as the coordination layer that prevents duplicate work across our servers — overlapping scheduled jobs, double-processed webhooks, clashing background tasks. The previous release (6.3.3) was a compatibility patch that widened our Laravel upgrade runway at no cost. The new release (6.4.0) is the first with actual new capability: it lets us control which classes are allowed to pass through the cache layer that underpins locking, which is a security hardening measure, and it brings the package's file, Redis, and Memcached behavior in line with Laravel's own. In plain terms: modest scope, low risk, no roadmap shift, but two things to check before we roll it out — file-based locks now store data differently, and we should confirm our configuration is set deliberately rather than by default. Recommendation: adopt after a targeted verification pass, then routine version bump; effort is measured in hours, not sprints.
For engineering (short brief): 6.4.0 is a minor release. Four changes: (1) config('cache.serializable_classes') is now respected for file, Redis, and Memcached stores; (2) a non-Laravel serializable_base_classes config as a fallback when maintaining an explicit allowlist is impractical; (3) file stores now use Laravel's Filesystem instead of Flysystem; (4) missing methods added to stores to match native Laravel stores. Three asks: (1) treat the file-store swap as potentially breaking for any shared or mounted lock directory — verify paths and permissions in staging before this rides along on a larger branch; (2) set serializable_classes explicitly and document why if you fall back to serializable_base_classes; (3) re-check the still-open item from 6.3.3 — lock-flush behavior on Laravel 13 — since the new store methods may have changed the answer, and update the runbook either way. Also confirm CI covers both Laravel 12 and 13.
How can I help you explore Laravel packages today?