MCPcopy Create free account
hub / github.com/dailydotdev/apps / invalidatePostCacheById

Function invalidatePostCacheById

packages/shared/src/hooks/usePostById.ts:41–50  ·  view source on GitHub ↗
(
  client: QueryClient,
  id: string,
)

Source from the content-addressed store, hash-verified

39}
40
41export const invalidatePostCacheById = (
42 client: QueryClient,
43 id: string,
44): void => {
45 const postQueryKey = getPostByIdKey(id);
46 const postCache = client.getQueryData(postQueryKey);
47 if (postCache) {
48 client.invalidateQueries({ queryKey: postQueryKey });
49 }
50};
51
52export const removePostComments = (
53 client: QueryClient,

Callers 2

SquadCommentJoinBannerFunction · 0.90
PostOptionButtonContentFunction · 0.90

Calls 1

getPostByIdKeyFunction · 0.90

Tested by

no test coverage detected