patch for bug 22981 : pass cached links to the extension hook too.