add cancel method and finished cache methods.