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

Do File Cache Psr 6 Laravel Package

jord-jd/do-file-cache-psr-6

PSR-6 cache adapter for DO File Cache, letting you use the PSR-6 caching interface with a simple file-based backend. Install via Composer: composer require jord-jd/do-file-cache-psr-6.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Cache-abstraction standardization (only if you actually need PSR-6). This package is a thin adapter that exposes jord-jd/do-file-cache behind Psr\Cache\CacheItemPoolInterface. It matters if your product ships a framework-agnostic library or SDK that must accept a PSR-6 pool from the host app, or if you are consolidating several cache call-sites onto the PSR-6 contract. It does not by itself give you a better cache — it gives you a port.
  • Build vs. buy — a clear "buy" on effort, a clear "no" on strategy. Writing a PSR-6 adapter over an existing file cache is roughly a day of engineering plus ongoing test upkeep. That is the entire value proposition: it saves you a day and removes one piece of undifferentiated code from your backlog. It is not a platform decision.
  • Backend optionality on the roadmap. The useful framing for a roadmap is "our cache layer is swappable." PSR-6 is the seam that makes a later move (Redis, Memcached, DB, in-memory) a configuration change rather than a refactor. This package is one possible implementation of that seam — the seam, not this package, is the durable asset.
  • Legitimate use cases (narrow):
    • Constrained or single-node environments where a managed cache is unavailable or uneconomic — shared hosting, small containers, on-prem/air-gapped appliances.
    • Dev/test parity with production when a cache server is impractical in CI.
    • Persistent cache that survives deploys and process restarts (long TTL for expensive reports, rendered fragments, third-party API responses).
    • Legacy or inherited apps already carrying jord-jd/do-file-cache that need a PSR-6 surface without a rewrite.
  • Decisions this should not drive: performance work, horizontal scaling, distributed cache consistency, cache tagging strategies at scale. File I/O on a local disk loses to memory/network caches on latency and to Redis on coordination. Any roadmap item that reads "improve cache performance by adopting this" is mis-scoped.

Adoption verdict for a PM: tactical, reversible, low-value dependency. Worth a ticket; not worth an architecture review.

When to Consider This Package

Adopt only when all of these hold:

  • You already depend on (or are deliberately choosing) jord-jd/do-file-cache — otherwise this adapter is a dead-end wrapper around a cache library you have no other reason to use.
  • You specifically need a PSR-6 CacheItemPoolInterface, not Laravel's Illuminate\Contracts\Cache\Repository (PSR-16-style) contract. Verify this first: Laravel's Cache facade is not a PSR-6 pool, so "works with the Cache facade" claims should be treated as unproven until you've seen it resolve from the container in a spike.
  • You are single-node or accept node-local caches (file caches do not coordinate across instances).
  • Read-heavy, write-light traffic with modest concurrency; no locks, sessions, or rate-limit counters stored here.
  • You can pin the version, own the fork if needed, and accept a bus-factor of one maintainer.

Look elsewhere when:

  • You just want a file cache in Laravel. The framework's file store already does this, is maintained by the framework, and is zero new dependencies.
  • You want a mature PSR-6 implementation. symfony/cache (with FilesystemAdapter, ArrayAdapter, RedisAdapter) is a PSR-6 and PSR-16 implementation with thousands of dependents, first-class docs, and predictable release cadence. For most teams this is the correct buy, and it makes this package redundant.
  • Latency is user-visible, or you need distributed consistency, atomic increments, tagging with cross-node invalidation, or observability (hit/miss metrics). Redis/Memcached territory.
  • Procurement requires vendor support, a security review trail, or an SLA.

Risk gates to clear before any code is written:

  • Adoption signal is effectively zero — 8 stars, 0 dependents. No ecosystem validation, no downstream bug reports, no community fixes. Recent releases (v2.0.1 "correct composer description", v3.0.1 "update badges") indicate a maintained repo rather than active development.
  • CI is Travis CI, which is largely dormant for open source; a green build badge is weak evidence of a working test suite today. Run the suite yourself before committing.
  • Licence: LGPL-3.0. For PHP this is generally workable (Composer autoloading is closer to dynamic linking than static), but it is not MIT/Apache. If you distribute a compiled or bundled product, or your legal team has a copyleft policy, get a five-minute opinion before adoption. This is the single most likely reason to say no for a commercial product.
  • Thin-wrapper mitigation: because the surface is small and PSR-6 is a fixed interface, the escape hatch is real — you can fork it or reimplement it over symfony/cache in under a day. Price that in rather than treating abandonment as a crisis.

Spike (half a day) before deciding: install, wire it into the container, exercise getItem/save/expiresAfter/deleteItem plus a TTL expiry and a concurrent-write smoke test, confirm PHP and framework version support, and confirm the maintainer's fork/ownership story.

How to Pitch It (Stakeholders)

For executives: "This is a small adapter that lets part of our codebase talk to caching through a PHP standard interface rather than a framework-specific one. The cost is trivial — a composer dependency and a day of integration — and it buys us the ability to swap cache backends later without a rewrite. The reason to be cautious is the other side of the ledger: it's an eight-star, single-maintainer, LGPL-licensed library with no downstream users. My recommendation is to take it as a tactical dependency, keep the dependency count honest, and not present it as a platform or performance investment. If our legal team objects to the licence or we want a supported option, symfony/cache is the substitute and the decision costs us nothing."

For engineering: "It's a PSR-6 CacheItemPoolInterface wrapper over jord-jd/do-file-cache. Take it only if you actually need a PSR-6 pool — and check first, because Laravel's repository is PSR-16-shaped, so the integration story in the README is thinner than it looks. If you want PSR-6 for real, symfony/cache's FilesystemAdapter gives you the same thing with maintenance and docs. If you take this one: pin it, add a container binding plus an integration test for TTL expiry and concurrent writes, and treat it as forkable — it's small enough that owning it is cheaper than a support negotiation. Don't put sessions, locks, or counters on it, and don't expect cross-node consistency. Estimated integration effort: half a day to spike, one day to productionize."

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