Hi! I’m new to Caddy and I love it so much already.
I’m playing around with writing some plugins to help me better understand the architecture.
What would be a good way to handle caching HTTP responses? I would like to put Caddy in front of several websites to handle caching, TLS, and maybe some security. I’ll make it so it doesn’t cache certain pages and HTTP methods.
At first I thought maybe I could use Middleware, but then I thought I would need to write two handlers; one handler to be called at the beginning to check if the cache exists, and another at the end to store the response. So, building it with Middlware didn’t seem like a good approach.
Then I thought about building something like the
reverse_proxy directive. I think this would be the best route, but I haven’t started on it yet.
I hope it’s okay to ask for some advice like this.