minor todo change
add: fallback to ~/.cache/ if XDG_CACHE_HOME not set (merge from cqexbesd); fix: buffer overflow