Data is not live in local host. Using old stale data
project id: 4eb6e470-f376-4b86-ba73-ba65844b9298
A couple days ago, while learning hw to use railway and postgresql, my data would update while im running my development server, however for the last couple days, the data is completely stale and still showing out of date data. I'm not sure if its a caching issue with Next js 13, but no matter what I do to the data thru railway, no changes are showing in my development server
Solution:Jump to solution
thanks for your help! I actually just figured out how to fix the issue
I had to delete the entire .next folder in the root directory since thats where all the caches are stored, and when i run 'npm run dev' it got completely fresh data.
As far as im aware, a lot of people have issues with how next caches data so much, but you definitely helped me narrow down the issues with your questions...
17 Replies
Project ID:
4eb6e470-f376-4b86-ba73-ba65844b9298
have you double checked to make sure the deployments are making it through to railway?
as far as I can tell in my railway log, its accessing it bc its showing TimescaleDB errors everytime I spin up the dev server @Brody
could this be browser cache? try clearing your browsers cache
@Brody just tried clearing the cache and it didnt change anything
to add though, ive got a console log of all my user data and its showing stale data for that too on the server console, so I know its not the browser
I tried looking thru the next caches and didnt see anything that stuck out to me, but its possible im not sure exactly what im looking for in those caches, and i also dont know if deleting any of those would break anything
would you mind taking a look at our #🛂|readme rule 5?
sorry abt that! will keep that in mind
are you deploying from the correct branch/repo?
yes, i actually dont have any version control for this project, so its all the original raw files from my pc
from railway up? or github
Im not using github for this project, but I don't think i ever did railway u[ either, cuz I'm not ready to go live with it,
but i just ran prisma studio and it does have the live data, so its somehwere in my source code, I can get a repo going on github if you'd like to take a look
oh youve only been developing your app locally, and have only been using railways database
correct
i mean this wouldn't be an issue specific to railway, you are just using a regular database after all, you may have better luck researching this issue outside of this server, since i have no experience with prisma myself
Solution
thanks for your help! I actually just figured out how to fix the issue
I had to delete the entire .next folder in the root directory since thats where all the caches are stored, and when i run 'npm run dev' it got completely fresh data.
As far as im aware, a lot of people have issues with how next caches data so much, but you definitely helped me narrow down the issues with your questions
should you put
.next/
in your .gitignore file?it might be smart to, once i do put it into a repo, but I'll have to do some testing to see how that affects any future clones of it, im guessing ur right on that