MCPcopy Create free account
hub / github.com/SvelteStack/svelte-query / optionalRemove

Method optionalRemove

src/queryCore/core/query.ts:219–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217 }
218
219 private optionalRemove() {
220 if (!this.observers.length) {
221 if (this.state.isFetching) {
222 if (this.hadObservers) {
223 this.scheduleGc()
224 }
225 } else {
226 this.cache.remove(this)
227 }
228 }
229 }
230
231 setData(
232 updater: Updater<TData | undefined, TData>,

Callers 2

scheduleGcMethod · 0.95
fetchMethod · 0.95

Calls 2

scheduleGcMethod · 0.95
removeMethod · 0.45

Tested by

no test coverage detected