MCPcopy
hub / github.com/multica-ai/multica / Invalidate

Method Invalidate

server/internal/auth/pat_cache.go:101–108  ·  view source on GitHub ↗

Invalidate removes the entry for hash. Called on PAT revocation so the revoke takes effect immediately rather than waiting for the TTL.

(ctx context.Context, hash string)

Source from the content-addressed store, hash-verified

99// Invalidate removes the entry for hash. Called on PAT revocation so the
100// revoke takes effect immediately rather than waiting for the TTL.
101func (c *PATCache) Invalidate(ctx context.Context, hash string) {
102 if c == nil {
103 return
104 }
105 if err := c.rdb.Del(ctx, patCacheKey(hash)).Err(); err != nil {
106 slog.Warn("pat_cache: invalidate failed; entry will expire on TTL", "error", err)
107 }
108}

Callers 8

TestPATCache_NilSafeFunction · 0.95
UpdateMemberMethod · 0.45
DeleteMemberMethod · 0.45
LeaveWorkspaceMethod · 0.45
DeleteWorkspaceMethod · 0.45
publishRevocationMethod · 0.45

Calls 1

patCacheKeyFunction · 0.85

Tested by 2

TestPATCache_NilSafeFunction · 0.76