-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache fetched courses #51
Comments
Can I claim this issue? |
Yes, go ahead! I never really made any progress on this. |
Hello! I managed to get it working under a new branch but for some reason it's not giving me permission to push. I tried doing it on Linux and Windows. I implemented a system in which it caches the searches and the individuals courses. So if you search something that was previously searched, it will still pull from the cache(Basic React Query which you guys already had), however during this process it also caches each course found. So now for each course search, it sees if the result was a search or course and if neither it calls the API again. The only drawback to this is the fact that very large searches like "EEL" for example, take about 30% longer, as it's caching all the courses but again now every course with EEL pops up almost instantly. |
In reference to Robert's comment #26 (comment).
Expected behavior:
When the user searches "MAC", all math courses are fetched like MAC2312, MAC2313, MAC1105, etc... What we want to do is cache all of these courses (I believe this is already the default behavior for React Query), so when the user queries a specific math course like MAC2312, we will fetch from the cache to get information for that specific course instead of refetching the API.
We can also fetch that course in the background and then update the cache with the latest information.
The text was updated successfully, but these errors were encountered: