public function readFile($filename, Environment $environment, $commitSha = null)
    {
        $commitSha = $this->normalizeSha($environment, $commitSha);
        $cacheKey = implode(':', ['raw', $environment->project, $filename, $commitSha]);
        $data = $this->cache->fetch($cacheKey);
        if (!is_array($data)) {
            // Find the file.
            if (($tree = $this->getTree($environment, dirname($filename), $commitSha))
                && ($blob = $tree->getBlob(basename($filename)))) {
                $raw = $blob->getRawContent();
            } else {
                $raw = false;
            }
            $data = ['raw' => $raw];
            // Skip caching if the file is bigger than 100 KiB.
            if ($raw === false || strlen($raw) <= 102400) {
                $this->cache->save($cacheKey, $data);
            }
        }

        return $data['raw'];
    }