Can not turn off caching with Next.js 14 (dev mode)
Unanswered
Phalène posted this in #help-forum
PhalèneOP
Using supabase real-time, "INSERT" payload is sent correctly (when checking with console.log and manually refreshing the page).
Tried:
# On the page
1) export const revalidate = 0;
2) export const revalidate = false;
3) export const dynamic = "force-dynamic";
# On the supabase config.
4) // https://github.com/orgs/supabase/discussions/20022
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
global: {
fetch: (url: any, options = {}) => {
return fetch(url, { ...options, cache: "no-store" });
},
},
}
);
export default supabase;
# In the useEffect creating the supabase channel:
5) revalidatePath("/"); // Invalidate the cache for the home
Appreciate any tips, tricks, etc.
Tried:
# On the page
1) export const revalidate = 0;
2) export const revalidate = false;
3) export const dynamic = "force-dynamic";
# On the supabase config.
4) // https://github.com/orgs/supabase/discussions/20022
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
global: {
fetch: (url: any, options = {}) => {
return fetch(url, { ...options, cache: "no-store" });
},
},
}
);
export default supabase;
# In the useEffect creating the supabase channel:
5) revalidatePath("/"); // Invalidate the cache for the home
Appreciate any tips, tricks, etc.