Caddy 2 source code is now available -- check it out!

I’m excited to unveil Caddy 2’s source code! Today I pushed it to the v2 branch of the repository.

The README in the v2 branch should contain all the information you need to get started.

Please try it out, file issues and submit your feedback!

Note that Caddy 2 is not feature-complete (is lacking some obvious things like logging, the Caddyfile, etc.) but we wanted you all to start getting involved ASAP.

Let me know what you think!


Any plan to support cache API?
We like to remove cache object by hostname (for example)

Hey Noam! :slight_smile: Yes, we’re working on an enterprise-grade cache module. I have a very basic distributed cache working (neglecting many corner cases currently). It’s still in the early stages. Would you be able to describe more specifically what your requirements are? You can either reply here (most helpful for the community) or email or DM me.

Hi Matt,
For us I think it’s pretty simple:

  1. We’re working with PROXY.
  2. So every request URL will be save in Caddy cache with a tag we will send to Caddy. For example: “12345”.
  3. The object will be use from Caddy cache until he expire or until we use Caddy API to remove this tag: “12345” from the cache.
    Important notes for us:
  4. Using the Caddy API we can remove a tag, so in one call we can remove a lot of cache objects.

I think KeyCDN doing that very very good:

They also have option to remove cache by URL:

This solution will help us move most of our traffic to Caddy server and reduce our web servers. Also it will help us to build Caddy server around the world that call main web server.

Let me know if you have more questions about that and keep the great work :slight_smile:

@job_noam Related, follow this issue on GitHub: Caddy 2 caching layer and API endpoints · Issue #2820 · caddyserver/caddy · GitHub

WOW it will be really great to have this kind of feature. Thx Matt :slight_smile: