Next.js Discord

Discord Forum

Cache in generateMetadata

Unanswered
rena.to posted this in #help-forum
Open in Discord
It's effectively false. Cache cannot be used outside a React context. I wonder why it's on docs yet after so many months.

How are you handling cache between generateMetadata and render?

1 Reply

@rena.to It's effectively false. Cache cannot be used outside a React context. I wonder why it's on docs yet after so many months. How are you handling cache between generateMetadata and render?
have you tried? it works completely fine during runtime. see image.

during build it's a different matter. deduplication of any kind doesn't work there. it's a bug but not specifically related to generateMetadata.