MCPcopy
hub / github.com/cursor/community-plugins / invalidate

Function invalidate

apps/cursor/src/actions/toggle-follow-action.ts:26–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 const supabase = await createClient();
25
26 const invalidate = () => {
27 // Profile follower counts, the followed user's followers list, and
28 // the current user's following list must all reflect the change.
29 updateTag(`user-${slug}`);
30 updateTag(`followers-${userId}`);
31 updateTag(`following-${currentUserId}`);
32 // The members directory caches rows (incl. follower_count) under
33 // `users`. Background-refresh it like other ambient counters
34 // (see star-plugin) instead of synchronously flushing every
35 // users-tagged entry on each follow click.
36 revalidateTag("users", "max");
37 };
38
39 if (action === "follow") {
40 const { error } = await supabase

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected