Cache public key while the application starting time itself

Hi Team,

Hi, I’m using below java library to validate the JWT token. Creating the cBean to cache the Public key. but I realized (based on Time taken to validate JWT token) that the public key will be cached only when we call the decode function from the AccessTokenVerifier class. this is expensive since we are running the springboot application in multiple pods and this decode method can be called only once we have the token.

which means if we have our application running in ‘n’ pods, for n number of business api calls OKTA internally call the public key endpoint to cache the public key.

Is there any way while the application starting time itself we can cache the public key ?

Vikas P