References panel: Serve cached data instead of refetching
Created by: umpox
We should cache loaded panel data against a revision to improve performance
- Go to https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/client/wildcard/src/components/Button/Button.tsx?L47:14#tab=references
- Click between 'references', 'history' and 'definition' tabs
- Notice how we refetch data every time. This issue is compounded for widely used references
This data is unlikely to change for the current revision, so we should cache it for as long as the user is on the page against this revision.
This also fixes a potential (?) bug where symbol data could be out-of-sync with the loaded file blob. As symbol data could refetch from latest main
without reloading the blob content