Avoid writing cache when the value is empty.