Closed kaf-lamed-beyt closed 6 months ago
Open the branch in Web Editor • VS Code • Insiders
Open Preview
Name | Link |
---|---|
Latest commit | 18bbbb6ca5def927c9e7c674e9e02caf8d65ef26 |
Latest deploy log | https://app.netlify.com/sites/made-in-nigeria-dev/deploys/661ed3ceb942050008a970cf |
Loool are you joking? @kaf-lamed-beyt 😂 Checking it out
I don't even know😂. The cache explanation is just assumption.
But, I'm pretty sure the revalidate property is definitely what's causing the refresh.
It does seem to fix it. Do you know how we should reset the cache when new projects are added to the readme then, or that should reset on build?
I think the build should reset the cache.
If there's a way to identify the cache with a key, it would have made it easier for us to reset it manually.
I don't know if it is possible with the cache
module from React. But, I'll check and let you know when I find something.
What does this PR do?
Fixes #315
@acekyd, I noticed that this issue was our own doing. I had to inspect the page in pro, and it refreshes every
5000ms
, which was what we've asked it to do, literally.I wondered why it worked formerly — no refreshes when it was formerly
3000ms
. The only hypothesis I have now is because the former implementation wasn't extending React's cache. Now that the request in the hook is memoized, there's no need for the revalidation, I guess.Eventually, I had to set
revalidate
to false.This PR [Fixes #315
Type of change
How should this be tested?
You can check this version I deployed on netlify
Checklist
Required
npm run build
console.logs
git pull origin main
Appreciated