Replies: 1 comment
-
It does cache but only to the extent of when you happen to hit the same instance of the worker again. There's no replicated cache in place. If there happened to be a common cache mechanism across the supported runtimes it would be no problem to use, but there isn't one. If you only target cf workers then copy the remote jwks code, add your caching, and use that as the key resolver function. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I've been experimenting with this library in Cloudflare Workers and was wondering if the caching of remote JWKS is supported automatically? I've seen that the library has a default cache of 10 minutes but wasn't sure if this was supported on CF workers. I've also seen that you can cache using fetch in CF workers.
I've added OTEL tracing via this library and it seems to show each request to the remote JWKS as taking some milliseconds which I wouldn't expect if it was cached. But this could be a limitation of the tracing capabilities in CF workers as accurate timing is not possible due to security concerns.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions