modify cache delete function