use sqlite for config and cache
refresh cache in background, closes #5