{% load i18n %}
{% if widget.data.cache_stats %}
 {% for hostname,stats in widget.data.cache_stats %}
  <table class="widget-rows">
  <colgroup>
   <col width="48%" />
   <col width="52%" />
  </colgroup>
  <tr>
   <th scope="row">{% trans "Memory Usage" %}</th>
   <td>{{stats.bytes|filesizeformat}}</td>
  </tr>
  <tr>
   <th scope="row">{% trans "Keys in Cache" %}</th>
   <td>{{stats.curr_items}} of {{stats.total_items}}</td>
  </tr>
  <tr>
   <th scope="row">{% trans "Cache Hits" %}</th>
   <td>{{stats.get_hits}} of {{stats.cmd_get}}: {{stats.hit_rate}}%</td>
  </tr>
  <tr>
   <th scope="row">{% trans "Cache Misses" %}</th>
   <td>{{stats.get_misses}} of {{stats.cmd_get}}: {{stats.miss_rate}}%</td>
  </tr>
  <tr>
   <th scope="row">{% trans "Cache Evictions" %}</th>
   <td>{{stats.evictions}}</td>
  </tr>
  <tr>
   <th scope="row">{% trans "Cache Traffic" %}</th>
   <td>{{stats.bytes_read|filesizeformat}} in,
       {{stats.bytes_written|filesizeformat}} out</td>
  </tr>
  <tr>
   <th scope="row">{% trans "Uptime" %}</th>
   <td>{{widget.data.uptime.value}} {{widget.data.uptime.unit}}</td>
  </tr>
  </table>
 {% endfor %}
{% else %}
 <p class="no-result">{% trans "Cache Offline or Unavailable" %}</p>
{% endif %}
