Skip to content

re #15 docs: Cache package guide#24

Merged
tonydspaniard merged 1 commit into
masterfrom
docs/cache
May 26, 2026
Merged

re #15 docs: Cache package guide#24
tonydspaniard merged 1 commit into
masterfrom
docs/cache

Conversation

@tonydspaniard
Copy link
Copy Markdown
Member

@tonydspaniard tonydspaniard commented May 26, 2026

Summary

Cache package documentation, per #15. Single new file: docs/packages/cache.md (~656 lines). Follows the structure established by #16 (Cookie): introduction, installation, quick start, concepts, usage, configuration, testing, extending, recipes, related packages, migration notes, limitations.

Covers PSR-6 and PSR-16 surfaces, all four backends (Filesystem / Memcached / Redis / Predis), namespace + lifetime semantics, deferred saves, the Configuration classes and their env vars.

Source observations

  • FilesystemCacheItemStorage stores zero-lifespan items with a 31,557,600-second (one-year) expiry — a deliberate workaround for the mtime-based hasItem(). Documented in the lifetime section.
  • CacheItemPool detects PredisCacheItemStorage specifically and calls useNamespace() directly on it — the pool skips its own prefix for Predis. Documented as a double-prefix risk.

Spun out as a separate issue

Test plan

  • Render the page on GitHub, skim for layout
  • Cross-links to sibling docs (./container.md, etc.) will resolve as those PRs merge
  • Pure docs additive — no code touched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant