]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: cache: indicate whether entries are stripped or not
authorMaxime Henrion <mhenrion@haproxy.com>
Tue, 26 May 2026 19:53:40 +0000 (15:53 -0400)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Jul 2026 14:42:35 +0000 (16:42 +0200)
A full cache entry now shows "type:full", whereas stripped entries used
to emit 103 responses show "type:hints".

src/cache.c

index 794d29ee4976f1bdd3a4a0a3328c12b8c10315a1..46f64110384e22ace050aa2b9839556aa37fb29b 100644 (file)
@@ -3410,7 +3410,8 @@ static int cli_io_handler_show_cache(struct appctx *appctx)
                                        chunk_printf(buf, "%p hash:%u vary:0x", entry, read_u32(entry->hash));
                                        for (i = 0; i < HTTP_CACHE_SEC_KEY_LEN; ++i)
                                                chunk_appendf(buf, "%02x", (unsigned char)entry->secondary_key[i]);
-                                       chunk_appendf(buf, " size:%u (%u blocks), refcount:%u, expire:%d\n",
+                                       chunk_appendf(buf, " type:%s size:%u (%u blocks), refcount:%u, expire:%d\n",
+                                                     (entry->flags & CACHE_EF_STRIPPED) ? "hints" : "full",
                                                      block_ptr(entry)->len, block_ptr(entry)->block_count,
                                                      block_ptr(entry)->refcount, entry->expire - (int)date.tv_sec);
                                }