kit icon indicating copy to clipboard operation
kit copied to clipboard

invalidate(url) not working for urls fetched in server load functions

Open alialaa opened this issue 3 years ago • 1 comments

Describe the bug

Shouldn't invalidate(url) work for urls that are fetched in both: shared and server load functions? currently it's only working using depends but not when using fetch.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-suzdro?file=src/routes/+page.svelte

Logs

No response

System Info

System:
    OS: macOS 12.1
    CPU: (8) arm64 Apple M1
    Memory: 78.59 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.16.0 - /usr/local/bin/node
    Yarn: 1.22.11 - ~/.npm-global/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
    Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 107.0.5304.110
    Safari: 15.2
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.89 
    @sveltejs/kit: next => 1.0.0-next.564 
    svelte: ^3.44.0 => 3.53.1 
    vite: ^3.1.0 => 3.2.4

Severity

serious, but I can work around it

Additional Information

No response

alialaa avatar Nov 28 '22 15:11 alialaa

Confirm, invalidate() works only with depends(), not url's. @sveltejs/kit - 1.0.0-next.570

Strutyk avatar Dec 01 '22 12:12 Strutyk