Skip to content

Make namespace a required Cacheables option#13

Merged
grischaerbe merged 3 commits into
nextfrom
grischaerbe/require-namespace
Apr 28, 2026
Merged

Make namespace a required Cacheables option#13
grischaerbe merged 3 commits into
nextfrom
grischaerbe/require-namespace

Conversation

@grischaerbe
Copy link
Copy Markdown
Owner

Summary

  • Promote namespace from optional to required on CacheablesOptions to eliminate the silent key-collision footgun when multiple Cacheables instances share an adapter.
  • Simplify #fullKey() (no more undefined branch) and update tests, README examples, and the v3→v4 migration notes accordingly.

Test plan

  • npm test (52/52 pass)
  • npm run typecheck clean

🤖 Generated with Claude Code

grischaerbe and others added 3 commits April 28, 2026 15:03
Promotes `namespace` from optional to required on `CacheablesOptions` to
prevent silent key collisions when adapters are shared across instances.
Drops the undefined branch in `#fullKey` and removes the verbatim-key
behaviour test along with related README/test updates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The latest published version on npm is v2.0.0; the breaking changes
land in v3, not v4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reconciles the required-namespace change with the bucket rename
landed on next (Cacheables → Cacheable, IStorageAdapter → IBucket,
MemoryAdapter → MemoryBucket, adapters → buckets).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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