phpfluent/cache
phpfluent/cache brings a fluent, expressive API to caching in Laravel. Store, retrieve, remember, and forget values through chainable calls with TTL and tag support, keeping cache logic readable and out of your controllers.
Architecture fit. phpfluent/cache is a standalone, framework-agnostic fluent-interface wrapper around PHP caching backends — a DX layer, not a caching engine. It is not a Laravel package in any meaningful sense: nothing in its public signal (13 stars, last release 2018-01-29, no identifiable repository) suggests a service provider, facade, config-publishing, or illuminate/* constraint. That places it beside Illuminate\Cache\CacheManager, not inside it. Adopting it means maintaining two cache abstractions in one codebase — one that Laravel's queue, session, and rate-limiter internals know nothing about.
Integration feasibility. Mechanically low-friction: MIT-licensed, small surface, Composer-installable, and — if it is a thin adapter — easy to comprehend in an afternoon. Practically, it is not auditable today: with the repository unknown/unavailable, we cannot inspect composer.json constraints, dependency graph, test coverage, driver list, or whether it implements PSR-16/PSR-6 or its own interface. A composite score of 0.185 against 13 stars is a durability signal, not a quality signal — treat it as "no evidence of health" rather than "proven bad."
Technical risk.
each(), loose typing, possibly deprecated create_function-style patterns) are the most common source of hard failures on upgrade.remember/tags/forever can silently swallow driver exceptions or normalize TTLs inconsistently; without tests we cannot verify stampede protection, tag invalidation, or serialization behavior.Key questions to close before any decision.
php and illuminate/* constraints, and is there any test suite or CI artifact?Cache::store()->remember() and Cache::lock() do not?Stack fit. Laravel already provides the capabilities this package advertises, plus things it almost certainly lacks: atomic locks, tag support with Redis/Memcached semantics, MemoizedStore, cluster-aware Redis, and per-store event hooks. The genuine value here, if any, is ergonomics — a chainable builder that reads better than nested closures. That is a developer-experience purchase, and it should be priced accordingly: not worth a runtime dependency with no maintainer.
Migration path. There is no migration; there is a replacement question. Recommended sequence:
Cache facade macro that wraps Illuminate\Contracts\Cache\Repository. This is typically 100–200 LOC, gives us identical ergonomics, inherits Laravel's drivers, locking, and events, and carries zero third-party risk.App\Contracts\CacheBuilder). Never let it appear in a controller or job directly.Compatibility. Assume the package targets PHP 7.x and Laravel 5.x-era illuminate/support. Running it under PHP 8.3 + Laravel 11/12 will require a fork: bumping constraints, replacing deprecated PSR interfaces, and validating return types. That fork is the real cost, and it is larger than writing the wrapper ourselves.
Sequencing. (1) Source archaeology and mirror to internal VCS. (2) API diff against Illuminate\Cache to isolate the unique value. (3) Timeboxed spike — one day — reimplementing the fluent surface as a macro. (4) Go/no-go: if the spike covers the use cases, close the dependency question permanently. (5) If not, fork, pin, add CI + dependency scanning, and schedule a review date.
Maintenance. Effectively zero upstream maintenance. Every PHP minor, every Laravel major, and every security advisory becomes our ticket. Budget a recurring line item for fork upkeep or, better, budget one sprint to remove the dependency entirely.
Support. No maintainer channel, no security disclosure policy, no issue tracker we can locate. Escalation path is internal-only. For a component on the request path, that is a governance finding, not a footnote.
Scaling. A fluent wrapper is thin, so throughput and latency characteristics are inherited almost entirely from the underlying driver — the package will not be the bottleneck, but it also will not help. Watch for two things if it is adopted: per-call builder allocation in hot loops, and whether it holds a single store instance or re-resolves connections per chain (the latter can multiply Redis connections under load).
Failure modes to instrument.
illuminate/* constraint blocks a Laravel upgrade mid-cycle.Ramp-up. Learning the API is trivial — hours, not days. The underestimated cost is organizational: explaining to reviewers why a dormant, unlocatable dependency exists, and re-litigating that decision at every security review and major upgrade. That recurring tax almost always exceeds the cost of the 150-line internal replacement.
How can I help you explore Laravel packages today?