accept cache and pkgcache as options