Are .server.ts fetch dependencies tracked? #13798
-
Quick question: Will calling I've noticed that Is this the expected behavior? I looked for more information in the documentation, but it doesn't seem to be explicitly covered there. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I did some digging and it is documented (albeit we could do better) https://svelte.dev/docs/kit/load#Rerunning-load-functions-Manual-invalidation
This probably makes sense since a server fetch could have some sensitive information in the URL if it's making a request to a private endpoint. Fortunately, you explicitly track it using the
|
Beta Was this translation helpful? Give feedback.
I did some digging and it is documented (albeit we could do better) https://svelte.dev/docs/kit/load#Rerunning-load-functions-Manual-invalidation
This probably makes sense since a server fetch could have some sensitive information in the URL if it's making a request to a private endpoint.
Fortunately, you explicitly track it using the
depends
function which is passed to https://svelte.dev/docs/kit/@sveltejs-kit#LoadEvent (scroll down a little to find the description).