Hey, thanks for the fast response. I was thinking about memory cache (maybe key-value redis like cache). I have saved /.well-known/keys json as a file and when I serve it as a static content it takes 30ms to download by the client, in comparison to around 1000ms when keys json is generated. But still /.well-known/openid-configuration/ points to dynamic /.well-known/keys endpoint so either all auto configured clients have to have override for keys endpoint url or I have to modify code to return my static file path as keys endpoint url.
Thanks!