From: Siraaj Khandkar Date: Mon, 20 Aug 2018 22:29:55 +0000 (-0400) Subject: Report GCed src and key more-clearly X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=9151826a7517f8c2ae88d74c003570bf30342778;p=khatus.git Report GCed src and key more-clearly --- diff --git a/bin/khatus_bar b/bin/khatus_bar index bd31283..9b0fd7f 100755 --- a/bin/khatus_bar +++ b/bin/khatus_bar @@ -96,14 +96,18 @@ function cache_get_time( src, key, time) { return time } -function cache_gc( src_and_key, unused_for) { +function cache_gc( src_and_key, parts, src, key, unused_for) { for (src_and_key in _cache) { - unused_for = cache_get_time() - _cache_atime[src_and_key] + split(src_and_key, parts, SUBSEP) + src = parts[1] + key = parts[2] + unused_for = cache_get_time() - _cache_atime[src, key] if (unused_for > 3600) { print_msg_info(\ - "cache_gc", "Deleting unused src_and_key: " src_and_key \ + "cache_gc", + sprintf("Deleting unused SRC=%s KEY=%s", src, key) \ ) - delete _cache[src_and_key] + delete _cache[src, key] } } }