caddyserver/cache-handler

Ability to force caching even if client sends no-cache

genox opened this issue · 2 comments

genox commented

Hi,

Is it possible to force cache even if the client sends no-cache in the request? During testing, I saw that when I disable cache in chrome, all requests that are supposed to be cached on the proxy are instant misses. Can this behaviour be configured?

Hello @genox, you can use the mode directive to bypass the RFC (the possible values are bypass bypass_request bypass_response strict). If you have to bypass only on the client request you can set it as bypass_request

e.g.

cache {
    // other directives...
    ttl 5m

    mode bypass_request
}
genox commented

Thank you