MCPcopy Index your code
hub / github.com/coder/coder / InvalidateUser

Method InvalidateUser

coderd/webpush/webpush.go:396–402  ·  view source on GitHub ↗

InvalidateUser clears the cached subscriptions for a user and advances its invalidation generation. Local subscribe and unsubscribe handlers call this after mutating subscriptions in the same process.

(userID uuid.UUID)

Source from the content-addressed store, hash-verified

394// its invalidation generation. Local subscribe and unsubscribe handlers call
395// this after mutating subscriptions in the same process.
396func (n *Webpusher) InvalidateUser(userID uuid.UUID) {
397 n.cacheMu.Lock()
398 delete(n.subscriptionCache, userID)
399 n.subscriptionGenerations[userID]++
400 n.cacheMu.Unlock()
401 n.subscriptionFetches.Forget(userID.String())
402}
403
404func (n *Webpusher) webpushSend(ctx context.Context, msg []byte, endpoint string, keys webpush.Keys) (int, []byte, error) {
405 // Copy the message to avoid modifying the original.

Callers

nothing calls this directly

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected