Caddy is losing caching information after server restart

Hi, I am evaluating Caddy web server for caching, it is working fine if I don’t restart Caddy. Caddy is losing caching information after server restart, then it takes time for downloading files for the first time. Is this is the default behavior of Caddy web server or am I missing any parameter in Caddy file?

Below is Caddy file

http://abc.example.com {
browse
proxy / https://xyz.example.com/repos

cache {
status_header X-Cache-status
default_max_age 10m
path caddy-cache
}
log / stdout “{remote} {when} {method} {uri} {proto} {status} {size} {>User-Agent} {cache_status} {latency}”
}

The cache plugin that you’re using isn’t in Caddy core:
https://caddyserver.com/docs/http.cache

There’s no mention here about cache being possibly persistent:

I would suggest opening an issue to request this feature.

Or in the meantime to create a script (possibly with wget or something similar) that would reload items that you would want persisted at each restart.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.