Category: Next.js, React and TypeScript

Next.js shows old data despite updating in the database — cache

Read this guide in Polish

After saving changes to the panel, the user refreshes the page and still sees the old value.

Where's the problem coming from?

The result can come from server cache, browser cache, static build or unfreshed React.

What to do step by step?

1. Open a direct API and check if it returns new data.

2 . Distinguish cache query, route and browser; set the place where the change disappears.

3 . Check revalidate settings or a clear refresh mechanism after mutation.

4 . For critical data, define a freshness strategy and possibly force dynamic download.

5 . Test after changing data without rebooting the server and from another device.

Correction test and important trap

After the update, the change appears in time consistent with the adopted strategy, not only after the new deploy.

Setting a no-store anywhere can make performance worse without need. Identify the right range.