supabase dosent fetch new data
Answered
American black bear posted this in #help-forum
American black bearOP
literally wrote 5 lines
23 Replies
American black bearOP
i changed the db manually and it dosent refresh the data when i manually refresh the page
try doing just JSON.stringify(content)
American black bearOP
nope, still the same data, just formatted differently in the page
i have only one row in my db and it is still loading rows i had 3 hours ago
i'm not sure if caching plays a role here but, just try ctrl+f5, also have you enabled rls and are permissions set correctly
@Manas i'm not sure if caching plays a role here but, just try ctrl+f5, also have you enabled rls and are permissions set correctly
American black bearOP
yes everything is set correctly, i am even using the admin anon key instead of the normal one to bypass everything
ok yeah caching definetly played a role
cause now i see the data i currently have
thank you
American black bearOP
its weird tho cause now i added a new row to the db and when i refresh i still dont get the new info
@Manas if you're thinking of adding auth to the app
American black bearOP
already have an auth system in place, thank you tho
export const revalidate = 0Answer
add this below the imports
it would disable the caching in one sense
American black bearOP
omg thank you so much
it works
ðŸ‘
@Manas consider opting to auth-helpers-nextjs package
just keep this in mind, i don't want you to struggle just the way i did after i got to know that i'd have to write the whole thing again just cause i decided to add auth to the app
as i see "userclient" as your table name ;P