Caddy 1 overcome cache

1. Caddy version (caddy version):

caddy v1.0.4

2. How I run Caddy:

I run it with systemctl

a. System environment:

LInux, systemd

b. Command:

/usr/local/bin/caddy "-agree=true" "-conf=/etc/caddy/Caddyfile" ""

c. Service/unit/compose file:

not relevant

d. My complete Caddyfile or JSON config:

cache {
    match_path /api/path
    default_max_age 60m 
    path /tmp/caddy-cache

3. The problem I’m having:

I am caching /api/path for 1 hour and it is working great. However, there are certain instances that we need to return a non-cached value. I tried appending another query parameter (something that wasn’t in the cache) but it still returns the cached value.

e.g. the original url hit is
That gets cached for 1 hour. However, if I try to change the url by adding another query param then I still get the cached value:

4. Error messages and/or full log output:

No error, I just expect it to not return a cached value.

5. What I already tried:

Tried appending a new query parameter at the end. No dice.

6. Links to relevant resources:

Caddy v1 is no longer supported. Please upgrade to Caddy v2.

You may use this plugin for caching in Caddy v2:

This topic was automatically closed after 30 days. New replies are no longer allowed.