Skip to content

feat: invoke a remove method on the queue after cache set #734

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

Closed

Conversation

james-elicx
Copy link
Contributor

@james-elicx james-elicx commented Feb 10, 2025

The idea behind this is that if we have an in-memory queue that wants to de-dupe on a per-isolate basis, we could invoke a method after the incremental cache set operation to remove the path from the list of active revalidations. Incremental cache set operation use the path as the key, so this should be a decent strategy for per-isolate queues.

includes #731 because i dont have permission to merge prs

Copy link

changeset-bot bot commented Feb 10, 2025

🦋 Changeset detected

Latest commit: 3d8e546

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Minor
app-pages-router Patch
app-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Feb 10, 2025

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/aws@734

commit: 3d8e546

Copy link
Contributor

@conico974 conico974 left a comment

Choose a reason for hiding this comment

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

I'm not sure how useful this will be once deployed honestly. Revalidation involves a HEAD request, how likely is it that the same isolate will send and receive the HEAD request.

And just awaiting the fetch call and removing there is probably as effective (and at least you're certain that you are running on the same isolate)

@james-elicx
Copy link
Contributor Author

Fair point. Makes sense.

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.

2 participants