Refactor git_cache to use an rwlock This significantly reduces contention when many threads are trying to read from the cache simultaneously.