php-extended/php-simple-cache-filesystem
A filesystem-backed PSR-16 simple cache implementation for PHP. Store and retrieve cache items as files with TTL support, offering a lightweight, dependency-free way to add persistent caching to Laravel or any PHP project.
Cache backend selection for a feature or service. Because the package implements Psr\SimpleCache\CacheInterface (PSR-16), the decision it actually informs is not "which file-cache library" but "can we satisfy this feature's caching need with local disk instead of standing up Redis/Memcached?" That is a real cost and roadmap lever for low-to-moderate throughput workloads.
Build vs. buy vs. use-the-framework. For a Laravel application this is close to a non-decision: Illuminate\Cache\FileStore already ships in the framework and is maintained by the core team. The package only becomes a genuine option when the consuming code must not depend on Laravel — e.g. an internal SDK, a shared domain package, a CLI tool, or a library published for other PHP projects.
Framework-agnostic architecture. If your roadmap includes extracting shared PHP components that run both inside and outside Laravel, coding against PSR-16 now means the eventual Laravel binding and the standalone binding are one-line swaps. This is the strongest strategic argument for the package and it is an architecture decision, not a feature decision.
Infrastructure cost and deployment constraints. Environments where only local disk is writable — shared hosting, some on-prem installs, single-container deployments, ephemeral CI — can use this without adding a managed cache service to the bill of materials or the ops runbook.
Dependency risk assessment. With zero dependents and no visible adoption signal, adopting it is a supply-chain decision as much as a technical one. That belongs in your risk register, not in a sprint ticket.
Consider it when most of the following hold:
get/set/delete/has, TTL in seconds) and you want the implementation to be replaceable without touching call sites.Look elsewhere when:
symfony/cache and php-cache/filesystem-adapter are the mature comparables; evaluate them first and treat this package as the fallback.To executives: This is a commodity component, not a strategic bet. It lets us add caching to parts of the PHP codebase without buying or operating an external cache service, which keeps infrastructure cost and operational surface flat. The trade-off is maturity: it has effectively no adoption and no support relationship, so we would own the code if it breaks. The right framing is "low-cost, low-risk-of-lock-in, low-support" — we can adopt it cheaply and leave it cheaply, because the PSR-16 interface means swapping it later is a small, contained change rather than a rewrite.
To engineering: It is a PSR-16 implementation backed by the filesystem — small surface area, standard interface, no framework coupling. That is the whole value proposition: your code type-hints CacheInterface, and the file backend is one binding. For Laravel services, don't use it — the framework's file store is the same idea with better maintenance and features. Use it where you need a cache in framework-agnostic code and cannot justify Redis. Before adopting, spend an hour on the source: check TTL handling, key sanitization, concurrency behavior on writes, and garbage collection. Pin the version, and keep the binding isolated behind our own service provider so replacement is a single file.
Recommendation: Do not adopt for Laravel-first work. Keep it as a documented fallback for framework-agnostic packages that need a PSR-16 file backend, with symfony/cache as the preferred default and this package only if its implementation review passes.
How can I help you explore Laravel packages today?