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 Configurable Cache Laravel Package

salehhashemi/laravel-configurable-cache

A Laravel package for configurable caching that lets you define cache settings like TTL, keys, and stores per model or query instead of hardcoding them, keeping cache logic centralized and easy to adjust across your application.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Per-domain cache policy design. Rather than one global CACHE_TTL and a single Redis store for the whole app, this package's premise is that cache behavior (TTL, store, key naming, invalidation strategy) is declared per model/entity/feature. That directly supports decisions like "product catalog caches for 15 minutes, user session-derived data for 60 seconds, pricing for 5 minutes with tag-based busting" without hardcoding values across the codebase.
  • Build vs. buy for a caching abstraction layer. Teams routinely hand-roll a CacheService wrapper with per-model constants. This is a candidate to replace ~1–3 days of internal plumbing plus ongoing maintenance. Evaluate against that internal baseline, not against Laravel's built-in Cache facade, which is the real incumbent.
  • Roadmap sequencing for performance work. If the roadmap calls for reducing p95 latency or database load, a configurable cache layer is an enabling dependency for incremental, per-feature caching rollouts. It lets you ship caching for one high-traffic surface at a time instead of a big-bang cache introduction.
  • Operational and multi-environment decisions. Config-driven cache definitions support different strategies in local/staging/production (e.g., array driver locally, Redis with tags in production) without code branches — relevant when deciding whether staging should mirror production cache semantics.
  • Cache invalidation correctness as a product risk. Any decision to cache user-visible data (inventory, pricing, permissions) is a correctness decision, not a performance one. This package's invalidation model should be evaluated as part of that risk conversation, since stale-cache bugs surface as product bugs.
  • Use cases that fit well: multi-tenant SaaS with per-tenant cache isolation, e-commerce catalog/pricing layers, CMS-driven content with scheduled expiry, dashboards aggregating expensive queries, API response caching with differentiated freshness requirements.

When to Consider This Package

Consider it when:

  • You have (or are about to have) more than one cached domain entity with genuinely different freshness and invalidation needs. A single-entity app does not justify the dependency.
  • Your team is already committed to Laravel's cache contracts and wants configuration over code — cache policy lives in config files reviewable by non-authors and changeable per environment.
  • You want to avoid bespoke cache wrapper code and are comfortable adopting a small third-party abstraction.
  • You are willing to read the source (it is small) and vendor/pin it, treating it as an internal utility rather than a maintained upstream dependency.

Look elsewhere / do not adopt when:

  • Maturity and bus-factor risk are disqualifying. 21 stars, 0 dependents, and a single maintainer mean near-zero ecosystem validation. For anything on a revenue-critical path, this is a "copy the patterns, write 150 lines yourself" situation rather than a Composer require.
  • License is unresolved. The NOASSERTION license is a hard blocker for most legal/procurement reviews. Do not ship it in a commercial or redistributed product until the license is clarified in writing.
  • You need tag-based invalidation, cache stampede protection, or or Cache::tags() semantics — verify by reading the source; do not assume. Laravel's built-in tag support (Redis/Memcached) may already cover you.
  • Your caching needs are uniform. If every entity shares one TTL, Laravel's native config is sufficient and adds zero risk.
  • You require vendor support, SLAs, or a security disclosure process. None of these are evident here.
  • The release date signal is unreliable — a future-dated release (2026-06-15) suggests tagging or metadata irregularities. Treat the release history as unverified until you inspect it.

Minimum due-diligence gate before adoption: license clarification, a read of the full source (~small surface), confirmation of Laravel/PHP version support against your matrix, a test-suite check, and an internal fork if you proceed.

How to Pitch It (Stakeholders)

For executives (one paragraph): We are evaluating a small open-source Laravel component that would let us define caching rules per feature in configuration rather than in code. The business value is faster pages and lower database cost, delivered incrementally — we can cache one high-traffic area at a time and tune freshness per feature instead of applying a single blunt setting. The strategic caveat is maturity: it is a young, single-maintainer project with no adoption footprint and an unclear license. My recommendation is to treat it as a design reference, not a dependency — adopt the pattern internally with roughly one to three days of engineering, which removes the licensing and continuity risk entirely while capturing most of the benefit. If we later standardize across multiple services, we can revisit consuming it directly once the license is settled.

For engineering: The proposal is a thin, config-driven cache policy layer replacing scattered Cache::remember calls and magic-number TTLs. Benefits: cache definitions become reviewable config, per-environment strategy differences stop leaking into code, and invalidation logic has one home. Costs: a new dependency with a single maintainer, no dependents, NOASSERTION license, and unverified tag/stampede semantics. My ask is a time-boxed spike (half a day): read the source, map its invalidation model against our two riskiest cached entities, and compare the effort to a ~150-line internal implementation using Laravel's native cache contracts. Default to the internal implementation unless the spike shows meaningfully non-trivial logic we would otherwise get wrong — particularly around key derivation and invalidation. Either way, we should define cache policy in config files and document freshness expectations per entity, since that is the durable win regardless of which path we take.

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.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log