Add usecacheonfailure option in agent config