rajmundtoth0/hybrid-cache
A Laravel package that adds a hybrid cache layer, combining fast in-memory storage with persistent backends to reduce latency and database load. It offers simple cache APIs and configurable drivers for scalable PHP applications.
touch addition is the concrete capability that makes this worth evaluating seriously.touch support: touch extends a key's TTL without rewriting its value. That unlocks product-level patterns that are otherwise awkward or wasteful: sliding-expiration sessions, "keep warm while actively used" cached API payloads, rate-limit or lease-style windows, and long-lived reference data that should expire only after abandonment. Previously these required read-then-rewrite cycles, which cost serialization, network round-trips, and (on Redis) unnecessary write amplification.touch improves hit ratios under sliding-expiration policies without additional write load.Consider it when:
touch) at scale, and rewriting values on every access is measurably expensive.Look elsewhere when:
Diligence items before adoption: confirm whether L13 is a floor or a ceiling; confirm whether touch is implemented for all supported drivers or only some (partial support is a common footgun and would make TTL behavior driver-dependent); check for a coherence/invalidation strategy; and get a read on the maintainer's release cadence.
For executives (one line): A small caching add-on that cuts database load and response times on read-heavy pages by keeping a fast in-memory copy in front of our persistent cache — and the new release lets us extend cache lifetimes cheaply instead of rewriting data on every hit. Low integration cost, but it's an early-stage community package, so we'd pilot it on one surface rather than standardize on it.
For engineering: Version 0.2.0 adds touch support — TTL extension without value rewrite — which removes the read-modify-write cost from sliding-expiration patterns, and brings the package onto Laravel 13. Worth a scoped spike: benchmark hit ratio and p99 latency on a read-heavy endpoint against our current single-tier setup, and explicitly test cross-node L1 staleness under invalidation. Treat the Laravel 13 change as a potential breaking constraint until confirmed, pin the version, and keep the existing cache abstraction in front of it so we can back out cleanly.
How can I help you explore Laravel packages today?