Next.js Discord

Discord Forum

Caching issues in 13

Unanswered
James posted this in #help-forum
Open in Discord
Hi Everyone,

I have a server page that I do NOT want to cache. I need it to re-retrieve and re-render every time the user navigates to it.

The component is simple; it calls a server action called "getNotifications," which in turn calls Prisma's FindMany function:

import { getNotifications } from '@/services/dataAccessService';
export const revalidate = 0;
export const dynamic = 'force-dynamic';
export const fetchCatche = 'force-no-store';

const Page = async () => {
const notifications = await getNotifications();

return (

As you can see, I've tried literally everything suggested to stop this page from caching, but it still is. I'm seeking advice on what I can try or what I'm doing wrong.

Thanks,
James

3 Replies

Bump
European sprat
This talks all about what you're experiencing and what options you have