diff --git a/internal/core/cache.go b/internal/core/cache.go index 75f7874..f02e1c0 100644 --- a/internal/core/cache.go +++ b/internal/core/cache.go @@ -44,6 +44,21 @@ const ( Expired ) +func (dc DeletionCause) String() string { + switch dc { + case Explicit: + return "Explicit" + case Replaced: + return "Replaced" + case Size: + return "Size" + case Expired: + return "Expired" + default: + panic("unknown deletion cause") + } +} + const ( minWriteBufferCapacity uint32 = 4 )