-
Notifications
You must be signed in to change notification settings - Fork 36
[cloudflare]: add docs for withFilter
#132
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
Conversation
pages/cloudflare/caching.mdx
Outdated
</Tabs.Tab> | ||
<Tabs.Tab> | ||
<Callout> | ||
The withFilter option is a specialized configuration that enhances your tagCache by layering an additional filter. It requires another tag cache to be passed in as the originalTagCache (e.g., `d1NextTagCache`, `doShardedTagCache` or your own). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The withFilter option is a specialized configuration that enhances your tagCache by layering an additional filter. It requires another tag cache to be passed in as the originalTagCache (e.g., `d1NextTagCache`, `doShardedTagCache` or your own). | |
The `withFilter` option is a specialized configuration that enhances your `tagCache` by layering an additional filter. It requires another tag cache to be passed in as the originalTagCache (e.g., `d1NextTagCache`, `doShardedTagCache` or your own). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
originalTagCache
-> tagCache
pages/cloudflare/caching.mdx
Outdated
<Callout> | ||
The withFilter option is a specialized configuration that enhances your tagCache by layering an additional filter. It requires another tag cache to be passed in as the originalTagCache (e.g., `d1NextTagCache`, `doShardedTagCache` or your own). | ||
</Callout> | ||
This enhanced tag cache selectively filters which tags trigger revalidations, allowing you to focus on a specific subset and reduce unnecessary load on the underlying tag cache. For convenience, we provide the ready-to-use softTagFilter that automatically filters out tags used within the `revalidatePath` function. Using this filter will break the `revalidatePath` function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This enhanced tag cache selectively filters which tags trigger revalidations, allowing you to focus on a specific subset and reduce unnecessary load on the underlying tag cache. For convenience, we provide the ready-to-use softTagFilter that automatically filters out tags used within the `revalidatePath` function. Using this filter will break the `revalidatePath` function. | |
This enhanced tag cache selectively filters which tags trigger revalidations, allowing you to focus on a specific subset and reduce unnecessary load on the underlying tag cache. For convenience, we provide the ready-to-use `softTagFilter` that automatically filters out tags used by the `revalidatePath` function making it a no-op. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a couple nits
Is the primarily use case to filter soft tags or do you have another use case in mind? |
It's mostly to filter out soft tags (but not necessarily all of them). |
@vicb I've added a line explaining the main purpose if you'd want to take a look |
Great, thanks! |
docs for opennextjs/opennextjs-cloudflare#608