sd-device: do not cache an empty string but clear cache on failre