Skip to content
Discussion options

You must be logged in to vote

I realized that cacheHandler can’t be used when cacheComponents: true is enabled. In that case, you need to use cacheHandlers instead, defining both the default handler and the remote one.

What I’m not fully sure about now is whether both approaches can be used together or what the recommended pattern is, especially when running the cache on a self-hosted Redis instance.

Also, when using cacheHandlers with a custom default handler, it seems that revalidatePath no longer works. It looks like only updateTag works, because revalidatePath expects the N_T/page tag to exist — and that tag is not stored when using cacheHandlers.

References:

https://nextjs.org/docs/app/api-reference/config/next-c…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@icyJoseph
Comment options

@ellemedit
Comment options

@ezeparziale
Comment options

Answer selected by ellemedit
@icyJoseph
Comment options

@ellemedit
Comment options

@ezeparziale
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants