Eliminate repeated JSON/DB connect/disconnects in cache threads; enable unique log file name