Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalidate resource #1280

Closed
wants to merge 1 commit into from
Closed

Conversation

tanhauhau
Copy link
Member

Fixes #1277

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts

@Conduitry
Copy link
Member

I haven't looked at this too closely and I haven't tried it out, but I think it would probably be good to normalize the URLs that are saved during each load() and that are passed to invalidate().

routes: CSRRoute[];
path: string;
query: URLSearchParams;
id: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like tabs got converted to spaces in this file

@Rich-Harris
Copy link
Member

working on this locally — at the moment it doesn't play well with caching (if you invalidate a URL within a page's maxage window, it doesn't do anything). am also wondering if we should batch invalidations, or if invalidate(...urls) is a sufficiently good API that batching is unnecessary

@Conduitry
Copy link
Member

Scheduled-for-next-microtask batching, like a bunch of other things in Svelte core, might be nice. Were you thinking of larger batches than that?

@Rich-Harris
Copy link
Member

no, just microtask

@Rich-Harris Rich-Harris mentioned this pull request May 2, 2021
5 tasks
@Rich-Harris
Copy link
Member

closing in favour of #1303 — thanks

@Rich-Harris Rich-Harris closed this May 2, 2021
@tanhauhau tanhauhau deleted the tanhauhau/invalidate branch May 2, 2021 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalidate fetched URLs
4 participants