API reference > @kontsedal/olas-core > WriteSource
WriteSource type
What produced a cache write:
'fetch'— a fetcher resolved (every page batch, for an infinite query) -'hydrate'— dehydrated data reached the entry (SSR, a warm start) -'optimistic'—setData, a guess a mutation may roll back -'rollback'— an optimistic layer was undone -'commit'— an optimistic layer was committed as server truth: its snapshot was finalized, as a successful mutation does. It is reported once no optimistic layer on the entry is live, sodataholds no pending guess. A commit made while another layer is live is reported by the settle that clears the last one, even when that settle is a rollback, and then in place of the'rollback'.updatedAtis when the server last answered (fetch, hydrated row or canonical write), since a commit does not restart the stale clock, or0when it never did. -'write'—write, a canonical patch -'replace'—replace, a canonical whole record
Signature:
typescript
type WriteSource = 'fetch' | 'hydrate' | 'optimistic' | 'rollback' | 'commit' | 'write' | 'replace';