Help to purging cache via cache-handler API

1. The problem I’m having:

I’m having trouble accessing the API of cache management provided by the cache-handler plugin. I’ve been attempting to configure a simple Caddyfile that enables the API, but I haven’t had any success. Could someone please provide me with a straightforward example of a Caddyfile that enables the API and guidance on how to make requests (using curl) to perform cache purging? Any assistance would be greatly appreciated. Thank you!

2. Error messages and/or full log output:

Trying “default” paths (from: GitHub - caddyserver/cache-handler: Distributed HTTP caching module for Caddy)

curl localhost:2019/souin-api/souin

I got response: 404

3. Caddy version:


4. How I installed and ran Caddy:

a. System environment:

WSL (Windows), downloaded binary and after installed caddy-handler with add-package.

caddy list-modules


  Standard modules: 106


  Non-standard modules: 2

b. Command:

caddy run

c. My complete Caddyfile:

	order cache before rewrite
	log {
		level debug
	cache {
		log_level debug
		api {
			# basepath /cache
			souin {
				# basepath /souin
		ttl 15s


route / {
	reverse_proxy localhost:8080

5. Links to relevant resources:

I solved it using the public port and the Cache-Control header (even empty)

curl -X GET http://localhost:8081/souin-api/souin -H "Cache-Control: "

now I need to reach the purge function… work in progress