Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Alternative Laravel Cache Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on concurrency primitives. This package supplies the locking/coordination layer (mutual exclusion around jobs, scheduled tasks, and shared resources) that would otherwise be hand-rolled against cache or database drivers. Release 6.4.0 moves the package from "maintenance only" back into active feature development, which strengthens the case for buying rather than building.
  • Security posture of unserialization paths. 6.4.0 adopts 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.
  • Framework upgrade planning (revised). 6.3.3 widened support down to Laravel 12 and earlier; 6.4.0 goes further by aligning store behavior with native Laravel stores — file stores now use Laravel's 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.
  • Roadmap sequencing for anything lock-dependent. Features that assume safe concurrent execution (idempotent webhooks, single-run cron tasks, queue de-duplication, rate-limited outbound calls) can be scheduled with reasonable confidence. This release is the strongest signal yet that the dependency is actively developed, not merely patched.
  • Risk register / dependency hygiene. Unlike 6.3.3, this is a minor release with new capability and a behavioral change (file-store backend swap). It still shouldn't unlock a deferred roadmap item on its own, but it changes the maintenance-risk rating and adds a concrete hardening lever worth scheduling.
  • Use cases in scope: scheduled task overlap prevention, queue job de-duplication, per-tenant operation serialization, protected one-off data migrations, distributed rate limiting — now with tighter control over which classes may cross the serialization boundary.

When to Consider This Package

Adopt when:

  • You need cross-process or cross-node mutual exclusion and are already running Laravel's cache/database stack — you get a maintained abstraction instead of bespoke Cache::lock() plumbing scattered across the codebase.
  • You run more than one app server, or queue workers alongside web traffic, so in-process locking is insufficient.
  • You need a support window that includes both current and previous Laravel majors. 6.3.3 widened compatibility; 6.4.0 builds on it.
  • You want class-allowlist control over lock serialization (6.4.0's serializable_classes / serializable_base_classes) rather than accepting whatever the cache driver will unserialize.
  • You want the locking behavior to be testable and swappable rather than baked into domain code.

Look elsewhere when:

  • You are single-node and in-process coordination (database transactions, unique constraints, withoutOverlapping) already covers it — this is unnecessary dependency surface.
  • You are already committed to Laravel 13 only and want guaranteed lock-flushing semantics. The package stepped back from 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.
  • You need strong guarantees (fencing tokens, consensus-backed locks, leader election with ordering). A cache-backed lock is advisory; do not build correctness-critical distributed systems on it.
  • You rely on 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):

  • File-store migration. Confirm where file locks now land on disk and with what permissions. If you share a lock directory across nodes or a mounted volume, validate it after the swap — Flysystem → Filesystem is intended to match Laravel, but your deployment's path semantics are the thing that breaks.
  • Serialization allowlist behavior. Test that 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.
  • New store methods. Diff the added methods against native Laravel stores and confirm they behave consistently across file/Redis/Memcached. Add coverage for any method your code now calls.
  • Lock-flush on Laravel 13. Still open from 6.3.3: verify the package's flush mechanism works now that CanFlushLocks isn't implemented, and check whether the new store methods change the answer.
  • CI matrix. Confirm both Laravel 12 and 13 are exercised; a minor release with driver-level changes is exactly where an untested major slips through.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast