Fix CachedPublicKeyring

I had this code already in my git, but it was in between the load of other things in there, just pulled it out.