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
70923dc0
Commit
70923dc0
authored
Mar 07, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SLT tag HitMiss to log hits on hit-for-miss objects.
parent
f464a94c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
1 deletion
+21
-1
cache_hash.c
bin/varnishd/cache/cache_hash.c
+3
-0
c00011.vtc
bin/varnishtest/tests/c00011.vtc
+7
-1
r01858.vtc
bin/varnishtest/tests/r01858.vtc
+6
-0
vsl_tags.h
include/tbl/vsl_tags.h
+5
-0
No files found.
bin/varnishd/cache/cache_hash.c
View file @
70923dc0
...
...
@@ -443,6 +443,8 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
oc
=
NULL
;
}
else
if
(
oc
->
flags
&
OC_F_PASS
)
{
wrk
->
stats
->
cache_hitmiss
++
;
VSLb
(
req
->
vsl
,
SLT_HitMiss
,
"%u"
,
ObjGetXID
(
wrk
,
oc
));
oc
=
NULL
;
*
bocp
=
hsh_insert_busyobj
(
wrk
,
oh
);
}
else
{
...
...
@@ -466,6 +468,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
if
(
exp_oc
!=
NULL
&&
exp_oc
->
flags
&
OC_F_PASS
)
{
wrk
->
stats
->
cache_hitmiss
++
;
VSLb
(
req
->
vsl
,
SLT_HitMiss
,
"%u"
,
ObjGetXID
(
wrk
,
exp_oc
));
exp_oc
=
NULL
;
busy_found
=
0
;
}
...
...
bin/varnishtest/tests/c00011.vtc
View file @
70923dc0
varnishtest "Test hit for
pass (pass from fetch
)"
varnishtest "Test hit for
miss (beresp.uncacheable = true
)"
server s1 {
rxreq
...
...
@@ -22,6 +22,10 @@ varnish v1 -vcl+backend {
}
} -start
logexpect l1 -v v1 -g vxid {
expect 1003 * HitMiss "^1002$"
} -start
client c1 {
txreq -url "/foo"
rxresp
...
...
@@ -49,3 +53,5 @@ client c1 {
}
client c1 -run
logexpect l1 -wait
bin/varnishtest/tests/r01858.vtc
View file @
70923dc0
...
...
@@ -22,6 +22,11 @@ varnish v1 -vcl+backend {
}
} -start
# Tests logging hit-for-miss on an expired object
logexpect l1 -v v1 -g vxid {
expect 1003 * HitMiss "^1002$"
} -start
client c1 {
txreq
rxresp
...
...
@@ -36,3 +41,4 @@ client c1 {
expect resp.body == "bar"
} -run
logexpect l1 -wait
include/tbl/vsl_tags.h
View file @
70923dc0
...
...
@@ -541,6 +541,11 @@ SLTM(H2TxBody, 0, "Transmitted HTTP2 frame body",
"Binary data"
)
SLTM
(
HitMiss
,
0
,
"Hit for miss object in cache."
,
"Hit-for-miss object looked up in cache. Shows the VXID of the"
" hit-for-miss object.
\n\n
"
)
#undef NODEF_NOTICE
#undef SLTM
...
...
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