change cache/device to be configurable