Acheung mock connection caching

Not sure why this is pulling in bmelts's commits, but mine is the only one to review.