fix sqlite db path
redo caching to just store minute averages