Next.js Discord

Discord Forum

How to disable the cache data and update every time client visit the page in Next.js - Amplify

Unanswered
Asian black bear posted this in #help-forum
Open in Discord
Asian black bearOP
I am using next.js 13 and amplify but my amplify cant detect new version until I logout and login again.

Why when I refresh the page I cant see last version of page?

layout.tsx | page.tsx
...
export const dynamic = 'force-dynamic'
export const revalidate = 0



Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103
Binaries:
Node: 19.0.0
npm: 9.7.1
Yarn: 1.22.19
pnpm: 8.9.2
Relevant Packages:
next: 13.4.12
eslint-config-next: 13.4.19
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A

0 Replies