Skip to content

Req.uncacheable#1

Open
gquintard wants to merge 1 commit into
dridi:masterfrom
gquintard:req.uncacheable
Open

Req.uncacheable#1
gquintard wants to merge 1 commit into
dridi:masterfrom
gquintard:req.uncacheable

Conversation

@gquintard

Copy link
Copy Markdown

there you go.

One note: REQ_FLAGS are a bit different from BO_FLAGS, and have an automatic VRT implementation, which notably means that req.uncacheable can be set back to false

The current way to bypass the cache is to either `return(pass)` in
`vcl_recv` or to trigger an HfP/HfM on the backend side.

The former forces you to interrupt the request processing, such as
header normalization, or to set a variable/header to remember your
choice so that you can return `pass` once processing is done.

The latter is nicer but has to deal with request coalescing and it
doesn't really make sense to wait that long before make this decision.

`req.uncacheable` mirrors `bereq.uncacheable` but really just
transforms a `return(hash)` into a `return(pass)`. This means that it
has priority over `req.hash_always_miss` but also operate slightly
earlier, at the end of vcl_recv` rather than at the end of `vcl_hash`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant