Add caching of private keys

Change-Id: Id0b8566d5bfeba9ccb0a0cd8d1a0d07e44496bd7