Skip to content
Prev Previous commit
Next Next commit
Add cache hit/miss note to cache panel and documentation
  • Loading branch information
Harsh3006 committed Aug 10, 2026
commit 91443f5826366a196359a08b82c631d18bb19963
9 changes: 8 additions & 1 deletion debug_toolbar/static/debug_toolbar/css/toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,14 @@
height: 50px;
}

#djDebug .djDebugPanelTitle code {
#djDebug .djdt-cache-note {
margin: 1em 0;
padding: 8px 10px;
border: 1px solid var(--djdt-table-border-color);
background-color: var(--djdt-panel-content-table-strip-background-color);
}
#djDebug .djDebugPanelTitle code,
#djDebug .djdt-cache-note code {
display: inline;
font-size: inherit;
}
Expand Down
5 changes: 5 additions & 0 deletions debug_toolbar/templates/debug_toolbar/panels/cache.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ <h4>{% translate "Summary" %}</h4>
</tr>
</tbody>
</table>
<p class="djdt-cache-note">
Cache hit/miss statistics for <code>cache.get()</code> calls may not always be accurate.
See <a href="https://github.com/django-commons/django-debug-toolbar/discussions/2441">the discussion</a>
for details and to share feedback about improving cache hit/miss tracking.
</p>
<h4>{% translate "Commands" %}</h4>
<table>
<thead>
Expand Down
6 changes: 6 additions & 0 deletions docs/panels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ Cache

Cache queries. Is incompatible with Django's per-site caching.

Cache hit/miss statistics for ``cache.get()`` calls may not always be
accurate. See the `discussion`_ for details and to share feedback about
improving cache hit/miss tracking.

.. _discussion: https://github.com/django-commons/django-debug-toolbar/discussions/2441

Signals
~~~~~~~

Expand Down