Split out callout-cache handling from do_callout()