Is there a way to write caddy v2 plugins in another language?

Here’s my immediate usecase:

It’s possible that this immediate usecase can be resolved just by affecting the HTTP request-response payloads (so FastCGI could work) but I wanted to learn about ways where more advanced behavior would be needed (for example, if I wanted to persist caddy config in Hashicorp Consul or secrets in Hashicorp Vault)

You mean API — Caddy Documentation

It looks like an admin API instead of being able to help with a plugin/module.

We can discuss here or at How can I configure caddy v2 to be an API proxy that can persist cached responses? , but I am having a tough time visualizing how I can use this API to:

  • cache responses
  • rewrite the API key in requests