cli: moved the rest of cache.py under cli/, do not pass configp around