properly clean up cache on disconnect