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.
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.
composer.json? Are Laravel 11 and 12 both in the matrix, and what PHP versions?Cache::flexible() in Laravel 11+/12?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.
Cache::flexible() and a hand-rolled remember + dispatch pattern — decide on measured latency and code delta.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.
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.
How can I help you explore Laravel packages today?