-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Is this feature request related to a problem with DevHub? Please describe.
The current implementation of the /profile
page requires multiple API calls to fetch data every time the page is refreshed or accessed, leading to stale data being rendered. Implementing browser caching can help improve performance and reduce unnecessary API calls.
Describe the solution needed
- Implement browser caching for the data fetched from the following APIs when the
/profile
page is accessed:- GitHub data
- Top languages
- Streak stats
- Pinned repositories
- LeetCode card
- Set a cache expiration policy to periodically update the cached data.
- Ensure that the cache is invalidated and refreshed when relevant user actions occur (e.g., adding a project or sending a friend request).
Describe alternatives considered
Currently, all data is fetched anew on each page load, which may not be efficient. Alternatives could include server-side caching or using state management libraries to store data temporarily, but these may not address the performance issues as effectively as browser caching.
How will this feature improve DevHub?
Implementing browser caching will enhance user experience by reducing load times and minimizing unnecessary API calls, leading to a more responsive application.
Additional context
Consider using libraries like localForage
or leveraging built-in browser caching mechanisms to implement this feature effectively.