Khao
Khao
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Khao on 6/27/2024 in #questions
I have been trying to get cache working with React-Query and Next.JS
Hello there, I'm trying to get this cache to work but I have searched far and wide and unless I'm blind or I didn't use the right keywords, I can't get this to work. Here is the sample code:
const { data, isPending, isStale } = useQuery({
queryKey: ["hilol"],
queryFn: () => {
console.log('HIIIII')
return "Hi"
},
gcTime: 5 * 60 * 1000,
staleTime: 7 * 60 * 1000
});
const { data, isPending, isStale } = useQuery({
queryKey: ["hilol"],
queryFn: () => {
console.log('HIIIII')
return "Hi"
},
gcTime: 5 * 60 * 1000,
staleTime: 7 * 60 * 1000
});
No matter how much refreshing I do on the page it still says it's pending and it's stale until the data loads in and the HIIIII gets logged.
6 replies
CCoder.com
Created by Khao on 6/7/2024 in #help
Code-Server Multi-user
Is there currently a self-hosted way of getting multiple users in the same code-server session and see each other like in VSCode Live Share?
18 replies