Skip to content

codeintel: Add cache for git diff hunks

Administrator requested to merge hunk-cache into master

Created by: efritz

https://github.com/sourcegraph/sourcegraph/pull/11815 is introducing batch requests, which can really hammer gitserver for the same git diff information for each sub resolver. This is happening regardless, but this new feature really made it obvious.

This PR adds a cache for git diff hunks keyed by the repository, path, and target/source commits that the codeintel resolvers can use to reduce the number of requests necessary to return large location responses for a nearest commit.

Merge request reports

Loading