def create_cache_dir(sha)
      file_dir = File.join(@cache_dir, sha)
      @cache_dir_mutex.with_read_lock do
        # mkdir_p doesn't error if the file exists
        FileUtils.mkdir_p(file_dir, mode: 0o750)
        FileUtils.touch(file_dir)
      end
      file_dir
    end
def create_cache_dir(sha)
      file_dir = File.join(@cache_dir, sha)
      @cache_dir_mutex.with_read_lock do
        # mkdir_p doesn't error if the file exists
        FileUtils.mkdir_p(file_dir, mode: 0o750)
        FileUtils.touch(file_dir)
      end
      file_dir
    end
Create a cache dir if necessary and update it's last write time. Returns the dir.
 Acquires @cache_dir_mutex to ensure we don't try to purge the directory at the same time.
 Uses the directory mtime because it's simpler to ensure the directory exists and update
 mtime in a single place than with a file in a directory that may not exist.