Cache.Stats reads never-populated output_content/request_cache tables, so TotalItems and TotalSizeBytes are always 0 #56
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Discovered while implementing #51 (out of scope there, filing per repo policy).
Cache.Statsininternal/imgcache/cache.gocomputesTotalItemsfromrequest_cacheandTotalSizeBytesfromoutput_content:No code path ever inserts into
output_contentorrequest_cache(they were created by migration 001 for a design that stored variants content-addressed with a request mapping, but the implementation went with key-addressedVariantStorageinstead). Both stats are therefore always 0.Since #51 (PR #55), real accounting exists:
variant_contenttracks processed variants andsource_contenttracks source blobs, andCache.UsageBytesreturns the true total. Suggested fix:TotalItems/TotalSizeBytesatvariant_content+source_content(or reuseUsageBytes).output_content/request_cachetables in a future migration or leave them for the originally intended design.Also worth a look in the same pass: the
metaCachefield onCache(in-memory variant meta cache) is initialized but never read or written.