smorken/array-cache
A lightweight in-memory array cache driver for Laravel. Store and retrieve cached values in a simple PHP array, ideal for testing, per-request caching, and avoiding external cache backends during development.
Architecture fit. smorken/array-cache presents as a caching extension — most plausibly a custom Laravel cache store/helper that materializes array-shaped data (config snapshots, lookup tables, feature matrices, reference data) closer to the runtime than a network cache hop. That positions it as a niche optimization, not a cache layer replacement: it competes with Laravel's native array and file stores and with config:cache, and it loses to Redis/Memcached on any requirement involving shared state across nodes. It is a plausible fit only for read-mostly, per-node, small-to-medium datasets with low invalidation frequency. It is a poor fit for tagged caches, counters, sessions, queues, or anything requiring cross-node consistency.
Integration feasibility. Technically low-friction in mechanism, high-friction in governance. It is a Composer package, presumably with a service provider, so wiring is a composer.json VCS entry plus provider registration. The friction is that it is Bitbucket-hosted with no visible Packagist distribution, no stars, no dependents, and a composite score of 0 — meaning we would be the first meaningful consumer. We must pin to a commit SHA (no reliable semver tags assumed), authenticate CI to Bitbucket, and treat the upstream as unvalidated. There is no evidence of a test suite, CI, or a release cadence.
Technical risk.
Illuminate\Contracts\Cache\Store/Repository, PSR-16, or a bespoke API. Swap-out cost depends entirely on this.Key questions for the maintainer (or source audit).
Cache::store('...') driver?remember, and increment/decrement semantics?array/file stores and config:cache do not?Stack fit. Viable as a contained, per-node read cache on a conventional Laravel monolith or a small fleet where each node tolerates slightly different cache state. Not viable as shared cache in a horizontally scaled or multi-tenant environment. Before any code lands, confirm it runs on our current PHP/Laravel baseline; if the version matrix is stale, the package is dead on arrival regardless of merit.
Migration path. Adopt behind an abstraction we own. Wrap every call site in an internal cache service or use Laravel's Cache facade with a custom store name, so the underlying driver is a config toggle. Then:
file or redis; that reversibility is the whole point of the abstraction.Compatibility. Verify Composer autoload/PSR-4 correctness, absence of framework version constraints that would block upgrades, and interaction with config:cache and route:cache. Confirm behavior under Octane long-lived workers and under multi-node deploys where warm-up and invalidation must be orchestrated per node.
Sequencing. (1) Source and license audit — small codebase, half a day. (2) Fork + mirror + Composer wiring. (3) Contract tests in CI. (4) Single-endpoint pilot with instrumentation. (5) Go/no-go: keep the fork, replace with a thin in-house implementation (likely <300 LOC), or fall back to native stores. Do not sequence this ahead of any Redis availability work — this package should only be adopted where a network cache hop is provably the bottleneck.
Maintenance. We become the de facto maintainer on adoption. There is no upstream release cadence, no issue tracker activity to rely on, and no security disclosure path. Assign a named owner in the platform team and budget a recurring slice of capacity for dependency bumps and PHP-version compatibility. The ongoing cost is low in lines of code and high in ownership ambiguity — the classic "orphan dependency" profile.
Support. No community, no dependents, no third-party documentation or Stack Overflow corpus. Troubleshooting is first-principles reading of the source. That is tractable for a small package but concentrates knowledge in one or two engineers; document the internals and the fork procedure.
Scaling. Scales with node count, not with data correctness: each node maintains its own cache, so invalidation is an N-node broadcast problem we must solve at the deploy layer. Disk footprint and opcache memory grow with cached dataset size — set a hard ceiling and an eviction policy. It provides no relief for write-heavy or shared-state workloads, and it does not reduce database load on the write path.
Failure modes to instrument before launch.
Ramp-up. The code is small enough that an engineer can read all of it in a day; the cost is context, not volume — understanding where Laravel's cache contracts end and this package's assumptions begin, plus the fork-and-pin workflow. Estimate two to three engineer-days for audit, fork, and contract tests; one to two sprints to productionize one workload with monitoring. Recommendation: do not adopt for production without the fork, the abstraction layer, and a named owner; treat the 31.32 opportunity score as "worth a spike," not "worth a dependency," given zero ecosystem validation.
How can I help you explore Laravel packages today?