[api] allow a host to also be passed into the cache api