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
a16aa3bc
Commit
a16aa3bc
authored
Dec 01, 2015
by
Dridi Boukelmoune
Committed by
Lasse Karstensen
Jan 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document that VCL_EVENT_USE is deprecated
And stop using it in the test suite. Also for 4.1
parent
05198064
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
v00044.vtc
bin/varnishtest/tests/v00044.vtc
+1
-2
vmod.rst
doc/sphinx/reference/vmod.rst
+10
-8
vmod_debug.c
lib/libvmod_debug/vmod_debug.c
+0
-1
No files found.
bin/varnishtest/tests/v00044.vtc
View file @
a16aa3bc
...
...
@@ -7,7 +7,7 @@ server s1 -repeat 20 {
close
} -start
# The debug vmod logs
som
e vcl events
# The debug vmod logs
temperatur
e vcl events
varnish v1 -arg "-p vcl_cooldown=1" -vcl {
import ${vmod_debug};
backend default {
...
...
@@ -69,7 +69,6 @@ varnish v1 -clierr 106 "vcl.state vcl2 cold"
logexpect l1 -v v1 -g raw {
expect * 0 Debug "vcl1: VCL_EVENT_COLD"
expect * 0 Debug "vcl1: VCL_EVENT_WARM"
expect * 0 Debug "vcl1: VCL_EVENT_USE"
} -start
# ...when you use a cold VCL
...
...
doc/sphinx/reference/vmod.rst
View file @
a16aa3bc
...
...
@@ -358,10 +358,10 @@ Event functions
VMODs can have an "event" function which is called when a VCL which imports
the VMOD is loaded, made active, or discarded. This corresponds to the
``VCL_EVENT_LOAD``,
``VCL_EVENT_USE``, and ``VCL_EVENT_DISCARD`` events,
respectively. In addition, this function will be called when the VCL state is
c
hanged to cold or warm, corresponding to the ``VCL_EVENT_COLD`` and
``VCL_EVENT_WARM``
events.
``VCL_EVENT_LOAD``,
and ``VCL_EVENT_DISCARD`` events, respectively. In
addition, this function will be called when the VCL temperature is changed to
c
old or warm, corresponding to the ``VCL_EVENT_COLD`` and ``VCL_EVENT_WARM``
events.
The first argument to the event function is a VRT context.
...
...
@@ -379,11 +379,13 @@ discarded and free this global state when the count reaches zero.
VMOD writers are *strongly* encouraged to release all per-VCL resources for a
given VCL when it emits a ``VCL_EVENT_COLD`` event. You will get a chance to
reacquire the resources before the VCL becomes active again and be notified
first with a ``VCL_EVENT_WARM`` event
, and then a ``VCL_EVENT_USE`` event.
Unless a user decides that a given VCL should always be warm, an inactive VMOD
will eventually become cold and should
manage resources accordingly.
first with a ``VCL_EVENT_WARM`` event
. Unless a user decides that a given VCL
should always be warm, an inactive VMOD will eventually become cold and should
manage resources accordingly.
.. TODO vmod objects
There is also a ``VCL_EVENT_USE`` event. Please note that this event is now
deprecated and may be removed in a future release. A warm VCL should be ready
to use so no additional task should be postponed at use time.
When to lock, and when not to lock
==================================
...
...
lib/libvmod_debug/vmod_debug.c
View file @
a16aa3bc
...
...
@@ -258,7 +258,6 @@ event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
switch
(
e
)
{
case
VCL_EVENT_COLD
:
ev
=
"VCL_EVENT_COLD"
;
break
;
case
VCL_EVENT_WARM
:
ev
=
"VCL_EVENT_WARM"
;
break
;
case
VCL_EVENT_USE
:
ev
=
"VCL_EVENT_USE"
;
break
;
default:
ev
=
NULL
;
}
...
...
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