MCPcopy Create free account
hub / github.com/Effect-TS/effect / store

Function store

packages/effect/src/ui/Query.ts:5991–6002  ·  view source on GitHub ↗
(entry: Entry, result: Settled)

Source from the content-addressed store, hash-verified

5989 }
5990 /** A settle or a stored write: patches held after success are confirmed and go. */
5991 const store = (entry: Entry, result: Settled): void => {
5992 save(entry, result)
5993 entry.result = result
5994 entry.settledAt = now()
5995 entry.invalidated = false
5996 entry.restarts = 0
5997 entry.heldRestart = false
5998 entry.interval = undefined
5999 entry.hydrated = false
6000 confirmHeld(entry)
6001 scheduleInterval(entry)
6002 }
6003 /**
6004 * Stores a fetch's Fails over the entry's last Success, and returns whether it did. An unwatched entry never
6005 * holds a Failure with no previous Success, except on the server, so that one isn't stored.

Callers 3

storeFailureFunction · 0.70
onFetchExitFunction · 0.70
storeWriteFunction · 0.70

Calls 4

confirmHeldFunction · 0.85
scheduleIntervalFunction · 0.85
saveFunction · 0.70
nowFunction · 0.70

Tested by

no test coverage detected