using bluebird replace when for cache