added cache for keys instead of alaws reading from the keystore