SolidJSS
SolidJS11mo ago
33 replies
gsoutz

query function invalidates the cache every 10 clicks

I was wondering why the Suspense is triggered once in a while, then I realized query is not caching the result long enough. As you can see in this example, once every 10 click's the fetch function is hit again. The question is why query invalidates the cache basically rendering it useless.

Here's the playground: https://playground.solidjs.com/anonymous/40fc1a3b-842a-4a02-8543-ebf113f9e1da
Quickly discover what the solid compiler will generate from your JSX template
Was this page helpful?