Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
593cc015
Commit
593cc015
authored
Mar 17, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consolidate return keyword documentation
parent
e1d47464
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
vcl-built-in-subs.rst
doc/sphinx/users-guide/vcl-built-in-subs.rst
+24
-15
No files found.
doc/sphinx/users-guide/vcl-built-in-subs.rst
View file @
593cc015
...
@@ -17,8 +17,8 @@ The behaviour for ``return()`` keywords is identical or at least
...
@@ -17,8 +17,8 @@ The behaviour for ``return()`` keywords is identical or at least
similar across subroutines, so differences are only documented where
similar across subroutines, so differences are only documented where
relevant.
relevant.
common return keywords
common return keywords
for the client and backend side
----------------------
----------------------
--------------------------------
.. _fail:
.. _fail:
...
@@ -31,6 +31,11 @@ common return keywords
...
@@ -31,6 +31,11 @@ common return keywords
Intended for fatal errors, for which only minimal error handling is
Intended for fatal errors, for which only minimal error handling is
possible.
possible.
client side
-----------
common return keywords for the client side
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. _synth:
.. _synth:
``synth(status code, reason)``
``synth(status code, reason)``
...
@@ -62,9 +67,6 @@ common return keywords
...
@@ -62,9 +67,6 @@ common return keywords
preserved except for ``req.restarts`` and ``req.xid``, which need
preserved except for ``req.restarts`` and ``req.xid``, which need
to change by design.
to change by design.
client side
-----------
.. _vcl_recv:
.. _vcl_recv:
vcl_recv
vcl_recv
...
@@ -323,6 +325,17 @@ following keywords:
...
@@ -323,6 +325,17 @@ following keywords:
Backend Side
Backend Side
------------
------------
common return keywords for the backend side
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. _abandon:
``abandon``
Abandon the backend request. Unless the backend request was a
background fetch, control is passed to :ref:`vcl_synth` on the
client side with ``resp.status`` preset to 503.
.. _vcl_backend_fetch:
.. _vcl_backend_fetch:
vcl_backend_fetch
vcl_backend_fetch
...
@@ -337,14 +350,12 @@ The `vcl_backend_fetch` subroutine may terminate with calling
...
@@ -337,14 +350,12 @@ The `vcl_backend_fetch` subroutine may terminate with calling
``fail``
``fail``
see `fail`_
see `fail`_
``abandon``
see `abandon`_
``fetch``
``fetch``
Fetch the object from the backend.
Fetch the object from the backend.
``abandon``
Abandon the backend request. Unless the backend request was a
background fetch, control is passed to :ref:`vcl_synth` on the
client side with ``resp.status`` preset to 503.
Before calling `vcl_backend_fetch`, Varnish core prepares the `bereq`
Before calling `vcl_backend_fetch`, Varnish core prepares the `bereq`
backend request as follows:
backend request as follows:
...
@@ -387,6 +398,9 @@ The `vcl_backend_response` subroutine may terminate with calling
...
@@ -387,6 +398,9 @@ The `vcl_backend_response` subroutine may terminate with calling
``fail``
``fail``
see `fail`_
see `fail`_
``abandon``
see `abandon`_
``deliver``
``deliver``
For a 304 response, create an updated cache object.
For a 304 response, create an updated cache object.
Otherwise, fetch the object body from the backend and initiate
Otherwise, fetch the object body from the backend and initiate
...
@@ -398,11 +412,6 @@ The `vcl_backend_response` subroutine may terminate with calling
...
@@ -398,11 +412,6 @@ The `vcl_backend_response` subroutine may terminate with calling
If the number of retries is higher than *max_retries*,
If the number of retries is higher than *max_retries*,
control will be passed to :ref:`vcl_backend_error`.
control will be passed to :ref:`vcl_backend_error`.
``abandon``
Abandon the backend request. Unless the backend request was a
background fetch, control is passed to :ref:`vcl_synth` on the
client side with ``resp.status`` preset to 503.
``pass(duration)``
``pass(duration)``
Mark the object as a hit-for-pass for the given duration. Subsequent
Mark the object as a hit-for-pass for the given duration. Subsequent
lookups hitting this object will be turned into passed transactions,
lookups hitting this object will be turned into passed transactions,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment