gitweb/lib - Use locking to avoid 'cache miss stampede' problem