Commit c6afd311 authored by Nils Goroll's avatar Nils Goroll Committed by Dridi Boukelmoune

Reflect API rename in docs

Ref 5df6f8d4
parent f07a6d61
......@@ -741,15 +741,15 @@ not be left half-initialized should a failure occur.
If your VMOD is running an asynchronous background job you can hold a reference
to the VCL to prevent it from going cold too soon and get the same guarantees
as backends with ongoing requests for instance. For that, you must acquire the
reference by calling ``VRT_ref_vcl`` when you receive a ``VCL_EVENT_WARM`` and
later calling ``VRT_rel_vcl`` once the background job is over. Receiving a
reference by calling ``VRT_VCL_Prevent_Discard`` when you receive a ``VCL_EVENT_WARM`` and
later calling ``VRT_VCL_Allow_Discard`` once the background job is over. Receiving a
``VCL_EVENT_COLD`` is your cue to terminate any background job bound to a VCL.
You can find an example of VCL references in vmod-debug::
priv_vcl->vclref = VRT_ref_vcl(ctx, "vmod-debug");
priv_vcl->vclref = VRT_VCL_Prevent_Discard(ctx, "vmod-debug");
...
VRT_rel_vcl(&ctx, &priv_vcl->vclref);
VRT_VCL_Allow_Discard(&ctx, &priv_vcl->vclref);
In this simplified version, you can see that you need at least a VCL-bound data
structure like a ``PRIV_VCL`` or a VMOD object to keep track of the reference
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment