<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/102088>102088</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Cache failed responses for debuginfod requests
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          correctmost
      </td>
    </tr>
</table>

<pre>
    LLVM's debuginfod client only seems to cache successful responses:
https://github.com/llvm/llvm-project/blob/6594f428de91e333c1cbea4f55e79b18d31024c4/llvm/lib/Debuginfod/Debuginfod.cpp#L179-L180

This causes tools like llvm-cov to make repeated requests across invocations, even if the debuginfod server has no relevant debuginfo data.  (This issue came up while investigating [a reported slowdown in llvm-cov on Arch](https://gitlab.archlinux.org/archlinux/packaging/packages/llvm/-/issues/5).)

The elfutils client [uses a short-lived cache for failed responses](https://sourceware.org/bugzilla/show_bug.cgi?id=25628). I'm hoping a similar mechanism can be added to LLVM's client.

There was some previous work in this area: https://github.com/llvm/llvm-project/pull/74757
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlE-PpDYQxT-NuZQGgYEGDhxmt4UUaXKLco0KU4AzxiYum87m00fQMz2zm1z20k3xx_7Ve6-MzHq2RJ2ovojqmmAMi_Odct6TCqvjkAxu_Na9vPz-q5A1w0hDnLWd3AjKaLIBnDXfgIlWhuBAoVoIOCpFzFM04Ik3Z5lYFM8iu4rseQlhOyvZC9nPOixxSJVbheyN2d__njbv_iQVhOwH4wYh-0vVllMpm5HanIqiULkaCMupqqhuh7wZizyTpSo_raOP764P5O-KVG2bkMVLXrdPL3mT3eHuv78tmkFhZDqacobB6FeCk0u5_Wh0xVcCTxthoBE8_RWJAwMq75hB290pDNpZFvIr0E4W9ARhoc8KMvmdPCzIYB14MrSjDR9vwIgBUwAhm5NIM0cChStB3OC2aEPHTsRBzxi0nUFUX_Cgcv6gYuNuo7tZ0PaD3Vl49moR1VXI5j9eGBxS9Gox2sa_U-dnIftHLWS_oXrFWdv5cU38IfiTkP0JedyrhGxTIdvvhSUgM8WgDb8HSFRfTqEReHE-PBm90_gWpMl5mFCbU-L3IP0PObvoFd3Q0xvzEOd_tDF4PFvc7Y8hzqmatSh6PYriKquLbA4--EXIeoXFbYd8CKxXbdDDSmpBq3kFhRYGAhxHGg_jH6Nwx09_aM8T3JCB3Uqwedq1iww3518PE8LhInpCUTzDT8_BFo0Rsq_LuqqTsSvGtmgxoS6vpWyzui7yZOlQ5pcM67ac6knlTVUO9dgUU41ZW0_5JU90JzNZZk12yXLZVHla5UMrVaEuZaHG6jKJMqMVtUmP7Q85k9PSLs9k1jSJwYEMnweGlJZu91QKKY_zw3cn8xBnFmVmNAf-WCboYKj7ejf2B1NPpz-NxvtAJdGb7qeVemTwjXnv5L8BAAD__28UoGE">