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

Laravel Permanent Cache Laravel Package

backstage/laravel-permanent-cache

A Laravel package for permanent caching: store values indefinitely and retrieve them until explicitly cleared, with a simple API for persistent, long-lived cache entries across your application.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package implements a stale-while-revalidate pattern at the Laravel cache layer: reads return the last-known value immediately, and an expensive operation is recomputed in the background (presumably via a queued job) rather than blocking the request. This is a well-understood pattern and fits read-heavy Laravel applications with costly data sources — dashboards, catalog/product pages, aggregated reporting, third-party API fan-out. It is a poor fit for anything requiring strong read consistency (balances, inventory counts, entitlement checks) where serving stale data is a correctness issue, not a latency tradeoff. Notably, Laravel 11+ ships Cache::flexible(), which covers much of the same ground natively and is still present in Laravel 12 — so the real architectural question remains "why this package versus the framework primitive," not just "does it work."

Integration feasibility. Low friction on paper: standard Composer install, Laravel package auto-discovery, a thin wrapper over the existing cache repository, and no schema changes or data migration. v0.3.17 (Laravel 12 support) removes the most immediate blocker for teams on the current framework major, extending the addressable install base. The hard dependency is still a functioning queue and worker pool — without it the "background update" half of the contract silently degrades into "permanent stale cache." That makes feasibility contingent on the team already running a healthy queue (Horizon, SQS, Redis) with monitoring.

Technical risk. High relative to the payoff, and unchanged by this release. Six stars and zero dependents means essentially no production validation and no downstream community to absorb breakage. Bus factor is likely one; the MIT license at least permits forking. The v0.3.17 release is a narrow, additive compatibility bump — a mildly positive maintenance signal, but it adds no hardening, observability, or safety features, and does not substitute for a test matrix. The "permanent" framing is still the sharpest risk: a cache with no TTL and a failed or stalled refresh path means users see stale data indefinitely with no self-healing. I'd also still want evidence of stampede protection (refresh-job deduplication/locking) — neither is implied by either the description or the release notes.

Key questions.

  • Is Laravel 12 support actually exercised in CI, or is it only a widened constraint in composer.json? Are Laravel 11 and 12 both in the matrix, and what PHP versions?
  • Which cache stores are supported (Redis, database, file, array) and do tags work?
  • How does refresh-job dispatch prevent duplicate/overlapping recomputes for the same key?
  • What happens when the queue is down, the job fails, or the store evicts the key?
  • Is there a configurable max-stale age or TTL fallback, or is staleness truly unbounded?
  • How does this differ materially from Cache::flexible() in Laravel 11+/12?
  • What is the maintainer's stated commitment, and what does the test suite cover?
  • Is the v0.3.17 bump semver-minor because it is purely additive, or does it drop support for an earlier Laravel/PHP combination the app still runs?

Integration Approach

Stack fit. Best match is a Laravel app already on Redis (or another shared store) with a mature queue and worker autoscaling, plus Horizon or equivalent for visibility. Teams on sync/database queues without workers should not adopt this until queue hygiene exists. Laravel 12 shops now clear the version gate; Laravel 10 and earlier shops get nothing from this release and should not assume parity of support.

Migration path. Purely additive and reversible. Adoption is wrapping specific expensive call sites rather than replacing the cache layer, so existing Cache::remember paths can coexist. No data migration; rollback is removing the wrapper and falling back to standard caching. Recommend a feature flag around the first wrapped path.

Compatibility. Pin an exact version — v0.3.17 or later if the app is on Laravel 12; on Laravel 11 or below, this release is a no-op and an earlier pin is equally viable. Verify the PHP/Laravel support matrix against the app before committing rather than trusting the release note, and confirm in CI that the constraint bump is a real tested combination. Audit transitive dependencies (should be near-zero for a package this size), and confirm Redis client compatibility if tags or store-specific features are used.

Sequencing.

  1. Time-boxed spike (1–2 days) reproducing a real heavy query/API call behind the package in staging, on the exact Laravel/PHP version you intend to ship.
  2. Compare against native Cache::flexible() and a hand-rolled remember + dispatch pattern — decide on measured latency and code delta.
  3. Pilot on one non-critical, high-traffic read path with queue alerting enabled.
  4. Only then expand to the top-N expensive call sites.
  5. Define an explicit eviction/invalidation policy before "permanent" becomes literal.

Operational Impact

Maintenance. Small code surface and minimal dependencies keep upkeep low, and v0.3.17 is the first concrete evidence of the package tracking current framework releases — mildly reassuring versus a fully dormant repo. That does not change the operating model: budget for periodic release checks, and assume fork-readiness. Treat it as internal code you happen to import. Note that a single compatibility-only release also means no accumulated bug-fix history to lean on.

Support. Community-only, no vendor SLA, likely a single maintainer. Internal documentation and a named owner are mandatory; do not depend on upstream responsiveness for incident triage.

Scaling. Background refresh scales horizontally with worker capacity, which is the main lever — watch queue backlog as the freshness SLO. Permanent caching also means unbounded key growth and memory pressure in Redis; capacity planning must include cache footprint, not just request throughput. Cold-start and mass-eviction events can trigger a recompute storm, so locking/dedupe behavior matters at scale. Nothing in v0.3.17 addresses any of this.

Failure modes.

  • Queue outage → users served stale data indefinitely (highest-severity risk; unaffected by the release).
  • Silent job failure → stale forever with no visible error; requires per-key freshness alerting.
  • Store eviction (Redis maxmemory) → cache miss reverts to blocking recompute, negating the benefit.
  • Duplicate refresh jobs → wasted worker cycles and thundering-herd risk.
  • Worker backlog → freshness SLO breach without availability impact.
  • Framework upgrade drift → a compatibility-only bump with unknown CI coverage means a future Laravel release can strand the package mid-upgrade. Mitigations: max-stale/TTL fallback, dedupe locks, freshness metrics per key, and a kill switch to revert to synchronous caching.

Ramp-up. Low for Laravel developers — a day to understand the pattern, a day to wire monitoring. The real ramp-up cost is organizational: establishing queue observability and a freshness SLO, which most teams adopting this package will not have in place yet.

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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource