add debug log message to clear_cached_oid function

This commit is contained in:
2024-09-30 00:31:28 +02:00
parent 22b6c9c751
commit 5bcda90b06

View File

@@ -365,12 +365,15 @@ declare -A OIDTYPES
function clear_cached_oid() { function clear_cached_oid() {
local base_oid=$1 local base_oid=$1
local oid local oid
local count=0
for oid in ${!OIDDATA[@]}; do for oid in ${!OIDDATA[@]}; do
if [[ $oid == $base_oid.* ]]; then if [[ $oid == $base_oid.* ]]; then
unset OIDDATA[$oid] unset OIDDATA[$oid]
unset OIDTYPES[$oid] unset OIDTYPES[$oid]
((count++))
fi fi
done done
echo "cache: removed $count OIDs" >&$DEBUGLOG
return 0 return 0
} }