Merged
Conversation
🦋 Changeset detectedLatest commit: 58af07b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
vicb
reviewed
Apr 28, 2025
| "@opennextjs/cloudflare": patch | ||
| --- | ||
|
|
||
| Add a new `withFilter` tag cache to allow to filter the tag cache used |
Contributor
There was a problem hiding this comment.
Suggested change
| Add a new `withFilter` tag cache to allow to filter the tag cache used | |
| Add a new `withFilter` tag cache to allow to filter the tags used |
vicb
reviewed
Apr 28, 2025
| expect(tagCache.getPathsByTags).toBeUndefined(); | ||
| }); | ||
|
|
||
| it("should properly filter soft tags", () => { |
Contributor
There was a problem hiding this comment.
Suggested change
| it("should properly filter soft tags", () => { | |
| it("should filter soft tags", () => { |
vicb
reviewed
Apr 28, 2025
Comment on lines
+4
to
+8
| /** | ||
| * The original tag cache. | ||
| * Call to this will receive only the filtered tags. | ||
| */ | ||
| originalTagCache: NextModeTagCache; |
Contributor
There was a problem hiding this comment.
maybe?
Suggested change
| /** | |
| * The original tag cache. | |
| * Call to this will receive only the filtered tags. | |
| */ | |
| originalTagCache: NextModeTagCache; | |
| /** | |
| * The wrapped tag cache. | |
| * Call to this will receive only the filtered tags. | |
| */ | |
| tagCache: NextModeTagCache; |
vicb
reviewed
Apr 28, 2025
| /** | ||
| * The function to filter tags. | ||
| * @param tag The tag to filter. | ||
| * @returns true if the tag should be forwarde, false otherwise. |
Contributor
There was a problem hiding this comment.
Suggested change
| * @returns true if the tag should be forwarde, false otherwise. | |
| * @returns true if the tag should be forwarded, false otherwise. |
vicb
reviewed
Apr 28, 2025
|
|
||
| /** | ||
| * Creates a new tag cache that filters tags based on the provided filter function. | ||
| * This is usefult to remove tags that are not used by the app, this could reduce the number of request to the underlying tag cache. |
Contributor
There was a problem hiding this comment.
Suggested change
| * This is usefult to remove tags that are not used by the app, this could reduce the number of request to the underlying tag cache. | |
| * This is usefull to remove tags that are not used by the app, this could reduce the number of requests to the underlying tag cache. |
vicb
approved these changes
Apr 28, 2025
Contributor
vicb
left a comment
There was a problem hiding this comment.
LGTM with a few minor comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new
withFilter"tag cache" that allows to filter the tag used.It is mostly useful to reduce the load on the underlying tag cache.
It also introduce a
softTagFilterfunction for those that usesrevalidateTag, but notrevalidatePath