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
5a1cdf99
Commit
5a1cdf99
authored
Nov 10, 2014
by
Arianna Aondio
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.varnish-cache.org:varnish-cache
parents
93a2f064
14a926bd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
38 deletions
+19
-38
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+0
-14
varnishhist.c
bin/varnishhist/varnishhist.c
+12
-9
v00025.vtc
bin/varnishtest/tests/v00025.vtc
+1
-2
generate.py
lib/libvcc/generate.py
+6
-13
No files found.
bin/varnishd/cache/cache_vrt_var.c
View file @
5a1cdf99
...
@@ -204,20 +204,6 @@ VRT_r_beresp_##field(VRT_CTX) \
...
@@ -204,20 +204,6 @@ VRT_r_beresp_##field(VRT_CTX) \
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
void
VRT_l_bereq_uncacheable
(
VRT_CTX
,
unsigned
a
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
->
bo
,
BUSYOBJ_MAGIC
);
if
(
ctx
->
bo
->
do_pass
&&
!
a
)
{
VSLb
(
ctx
->
vsl
,
SLT_VCL_Error
,
"Ignoring attempt to reset bereq.uncacheable"
);
}
else
if
(
a
)
{
ctx
->
bo
->
do_pass
=
1
;
}
}
unsigned
unsigned
VRT_r_bereq_uncacheable
(
VRT_CTX
)
VRT_r_bereq_uncacheable
(
VRT_CTX
)
{
{
...
...
bin/varnishhist/varnishhist.c
View file @
5a1cdf99
...
@@ -193,7 +193,8 @@ static int /*__match_proto__ (VSLQ_dispatch_f)*/
...
@@ -193,7 +193,8 @@ static int /*__match_proto__ (VSLQ_dispatch_f)*/
accumulate
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
const
pt
[],
accumulate
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
const
pt
[],
void
*
priv
)
void
*
priv
)
{
{
int
i
,
j
,
tag
,
skip
,
match
,
hit
;
int
i
,
tag
,
skip
,
match
,
hit
;
unsigned
u
;
double
value
;
double
value
;
struct
VSL_transaction
*
tr
;
struct
VSL_transaction
*
tr
;
...
@@ -259,13 +260,15 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
...
@@ -259,13 +260,15 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
/* phase out old data */
/* phase out old data */
if
(
nhist
==
HIST_N
)
{
if
(
nhist
==
HIST_N
)
{
j
=
rr_hist
[
next_hist
];
u
=
rr_hist
[
next_hist
];
if
(
j
<
0
)
{
if
(
u
>=
hist_buckets
)
{
assert
(
bucket_miss
[
-
j
]
>
0
);
u
-=
hist_buckets
;
bucket_miss
[
-
j
]
--
;
assert
(
u
<
hist_buckets
);
assert
(
bucket_hit
[
u
]
>
0
);
bucket_hit
[
u
]
--
;
}
else
{
}
else
{
assert
(
bucket_
hit
[
j
]
>
0
);
assert
(
bucket_
miss
[
u
]
>
0
);
bucket_
hit
[
j
]
--
;
bucket_
miss
[
u
]
--
;
}
}
}
else
{
}
else
{
++
nhist
;
++
nhist
;
...
@@ -274,10 +277,10 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
...
@@ -274,10 +277,10 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
/* phase in new data */
/* phase in new data */
if
(
hit
)
{
if
(
hit
)
{
bucket_hit
[
i
]
++
;
bucket_hit
[
i
]
++
;
rr_hist
[
next_hist
]
=
i
;
rr_hist
[
next_hist
]
=
i
+
hist_buckets
;
}
else
{
}
else
{
bucket_miss
[
i
]
++
;
bucket_miss
[
i
]
++
;
rr_hist
[
next_hist
]
=
-
i
;
rr_hist
[
next_hist
]
=
i
;
}
}
if
(
++
next_hist
==
HIST_N
)
{
if
(
++
next_hist
==
HIST_N
)
{
next_hist
=
0
;
next_hist
=
0
;
...
...
bin/varnishtest/tests/v00025.vtc
View file @
5a1cdf99
...
@@ -22,6 +22,7 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
...
@@ -22,6 +22,7 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
set resp.http.esi = req.esi;
set resp.http.esi = req.esi;
set resp.http.be = req.backend_hint;
set resp.http.be = req.backend_hint;
set resp.http.c_id = client.identity;
set resp.http.c_id = client.identity;
if (obj.uncacheable) { }
}
}
sub vcl_backend_response {
sub vcl_backend_response {
...
@@ -41,7 +42,6 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
...
@@ -41,7 +42,6 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
sub vcl_hit {
sub vcl_hit {
if (obj.proto) { }
if (obj.proto) { }
if (obj.reason) { }
if (obj.reason) { }
if (obj.uncacheable) { }
if (obj.keep > 1m) { }
if (obj.keep > 1m) { }
if (obj.grace < 3m) {
if (obj.grace < 3m) {
return (deliver);
return (deliver);
...
@@ -52,7 +52,6 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
...
@@ -52,7 +52,6 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
}
}
sub vcl_backend_fetch {
sub vcl_backend_fetch {
set bereq.uncacheable = false;
if (bereq.between_bytes_timeout < 10s) {
if (bereq.between_bytes_timeout < 10s) {
set bereq.http.quick = "please";
set bereq.http.quick = "please";
}
}
...
...
lib/libvcc/generate.py
View file @
5a1cdf99
...
@@ -360,17 +360,10 @@ sp_variables = [
...
@@ -360,17 +360,10 @@ sp_variables = [
(
'bereq.uncacheable'
,
(
'bereq.uncacheable'
,
'BOOL'
,
'BOOL'
,
(
'backend'
,
),
(
'backend'
,
),
(
'backend_fetch'
,
),
"""
(
),
"""
Indicates whether the object requested from the backend is
Indicates whether this request is uncacheable due
going to be uncacheable - either because the request was an
to a pass in the client side or a hit on an existing
explicit pass from the client side or a hit on an uncacheable
uncacheable object (aka hit-for-pass).
("hit for pass") object.
Setting this variable in vcl_backend_fetch makes the object
uncacheable.
Clearing the variable has no effect and will log the warning
"Ignoring attempt to reset bereq.uncacheable".
"""
"""
),
),
(
'bereq.connect_timeout'
,
(
'bereq.connect_timeout'
,
...
@@ -612,9 +605,9 @@ sp_variables = [
...
@@ -612,9 +605,9 @@ sp_variables = [
),
),
(
'obj.uncacheable'
,
(
'obj.uncacheable'
,
'BOOL'
,
'BOOL'
,
(
'
hit
'
,
),
(
'
deliver
'
,
),
(
),
"""
(
),
"""
Whether the object is uncacheable (
aka hit-for-pass)
Whether the object is uncacheable (
pass or hit-for-pass).
"""
"""
),
),
(
'resp'
,
(
'resp'
,
...
...
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