Skip to content

Add manual cache invalidation API - #443

Merged
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
Caerlower:feat/manual-cache-invalidation
Aug 19, 2026
Merged

Add manual cache invalidation API#443
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
Caerlower:feat/manual-cache-invalidation

Conversation

@Caerlower

@Caerlower Caerlower commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add public client.cache.invalidate(...) API for manual cache eviction
  • support invalidating a single key and prefix/pattern invalidation
  • keep adapter compatibility by using deleteByPrefix when available and falling back to clear() when not
  • add unit tests for key invalidation, prefix invalidation, fallback behavior, and no-cache no-op behavior

Why

Consumers can mutate state outside SDK-observed paths (for example admin or integration flows), which can otherwise leave SDK cache entries stale until TTL expiry.

Test plan

  • pnpm test:run

Closes Adamantine-guild/guildpass-app#328

@Lakes41
Lakes41 merged commit 104066e into Adamantine-guild:main Aug 19, 2026
1 check passed
@Caerlower
Caerlower deleted the feat/manual-cache-invalidation branch August 19, 2026 17:58
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.

Add manual cache invalidation API to watchAndInvalidate

2 participants