Spin-coated silver nanocomposite resistive switching devices