stats_cache_dir is a function
settings: encode data as varint; add varing encoder/decoder to BaseUtil.cpp; renames for style