MCPcopy Create free account
hub / github.com/effect-app/libs / getDerivedInvalidationKeys

Function getDerivedInvalidationKeys

packages/vue/src/dependencyMetadata.ts:29–38  ·  view source on GitHub ↗
(
  writeDependencies: DataDependencies.DataDependencies
)

Source from the content-addressed store, hash-verified

27 if (mode === "soft") entry.softSubscribers--
28 else entry.awaitSubscribers--
29 if (entry.awaitSubscribers === 0 && entry.softSubscribers === 0) invalidationModes.delete(hash)
30 }
31}
32
33export const getQueryInvalidationMode = (key: ReadonlyArray<unknown>): QueryInvalidationMode => {
34 const entry = invalidationModes.get(Hash.hash(key))
35 return entry !== undefined && entry.awaitSubscribers === 0 && entry.softSubscribers > 0 ? "soft" : "await"
36}
37
38export const setQueryReadDependencies = (
39 key: ReadonlyArray<unknown>,
40 reads: DataDependencies.DataDependencies
41) => {

Callers 2

invalidateCacheFunction · 0.90

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…