Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
e4a0af76
Commit
e4a0af76
authored
Mar 03, 2011
by
Tollef Fog Heen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.varnish-cache.org/git/varnish-cache
parents
6587c5d5
2b4e6317
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
26 deletions
+28
-26
heritage.h
bin/varnishd/heritage.h
+2
-2
mgt_param.c
bin/varnishd/mgt_param.c
+4
-2
rfc2616.c
bin/varnishd/rfc2616.c
+15
-20
index.rst
doc/sphinx/glossary/index.rst
+7
-2
No files found.
bin/varnishd/heritage.h
View file @
e4a0af76
...
...
@@ -71,7 +71,7 @@ struct params {
gid_t
gid
;
/* TTL used for lack of anything better */
unsigned
default_ttl
;
double
default_ttl
;
/* Maximum concurrent sessions */
unsigned
max_sess
;
...
...
@@ -163,7 +163,7 @@ struct params {
unsigned
diag_bitmap
;
/* Default grace period */
unsigned
default_grace
;
double
default_grace
;
/* Log hash string to shm */
unsigned
log_hash
;
...
...
bin/varnishd/mgt_param.c
View file @
e4a0af76
...
...
@@ -502,7 +502,8 @@ static const struct parspec input_parspec[] = {
"The unprivileged group to run as."
,
MUST_RESTART
,
MAGIC_INIT_STRING
},
{
"default_ttl"
,
tweak_uint
,
&
master
.
default_ttl
,
0
,
UINT_MAX
,
{
"default_ttl"
,
tweak_timeout_double
,
&
master
.
default_ttl
,
0
,
UINT_MAX
,
"The TTL assigned to objects if neither the backend nor "
"the VCL code assigns one.
\n
"
"Objects already cached will not be affected by changes "
...
...
@@ -573,7 +574,8 @@ static const struct parspec input_parspec[] = {
"Maximum is 65535 bytes."
,
0
,
"255"
,
"bytes"
},
{
"default_grace"
,
tweak_uint
,
&
master
.
default_grace
,
0
,
UINT_MAX
,
{
"default_grace"
,
tweak_timeout_double
,
&
master
.
default_grace
,
0
,
UINT_MAX
,
"Default grace period. We will deliver an object "
"this long after it has expired, provided another thread "
"is attempting to get a new copy.
\n
"
...
...
bin/varnishd/rfc2616.c
View file @
e4a0af76
...
...
@@ -71,9 +71,9 @@ SVNID("$Id$")
double
RFC2616_Ttl
(
const
struct
sess
*
sp
)
{
int
ttl
;
double
ttl
;
unsigned
max_age
,
age
;
double
h_date
,
h_expires
,
ttd
;
double
h_date
,
h_expires
;
char
*
p
;
const
struct
http
*
hp
;
...
...
@@ -84,7 +84,6 @@ RFC2616_Ttl(const struct sess *sp)
ttl
=
params
->
default_ttl
;
max_age
=
age
=
0
;
ttd
=
0
;
h_expires
=
0
;
h_date
=
0
;
...
...
@@ -116,6 +115,8 @@ RFC2616_Ttl(const struct sess *sp)
if
(
http_GetHdr
(
hp
,
H_Expires
,
&
p
))
h_expires
=
TIM_parse
(
p
);
/* No expire header, fall back to default */
if
(
h_expires
==
0
)
break
;
...
...
@@ -129,8 +130,7 @@ RFC2616_Ttl(const struct sess *sp)
}
if
(
h_date
==
0
||
(
h_date
<
sp
->
wrk
->
entered
+
params
->
clock_skew
&&
h_date
+
params
->
clock_skew
>
sp
->
wrk
->
entered
))
{
fabs
(
h_date
-
sp
->
wrk
->
entered
)
<
params
->
clock_skew
)
{
/*
* If we have no Date: header or if it is
* sufficiently close to our clock we will
...
...
@@ -139,27 +139,22 @@ RFC2616_Ttl(const struct sess *sp)
if
(
h_expires
<
sp
->
wrk
->
entered
)
ttl
=
0
;
else
tt
d
=
h_expires
;
tt
l
=
h_expires
-
sp
->
wrk
->
entered
;
break
;
}
else
{
/*
* But even if the clocks are out of whack we can still
* derive a relative time from the two headers.
* (the negative ttl case is caught above)
*/
ttl
=
(
int
)(
h_expires
-
h_date
);
}
/*
* But even if the clocks are out of whack we can still
* derive a relative time from the two headers.
* (the negative ttl case is caught above)
*/
ttl
=
(
int
)(
h_expires
-
h_date
);
}
while
(
0
);
if
(
ttd
>
0
)
ttl
=
ttd
-
sp
->
wrk
->
entered
;
/* calculated TTL, Our time, Date, Expires, max-age, age */
WSP
(
sp
,
SLT_TTL
,
"%u RFC %d %d %d %d %u %u"
,
sp
->
xid
,
ttd
?
(
int
)(
ttl
)
:
0
,
(
int
)
sp
->
wrk
->
entered
,
(
int
)
h_date
,
(
int
)
h_expires
,
max_age
,
age
);
WSP
(
sp
,
SLT_TTL
,
"%u RFC %g %g %g %g %u %u"
,
sp
->
xid
,
ttl
,
sp
->
wrk
->
entered
,
h_date
,
h_expires
,
max_age
,
age
);
return
(
ttl
);
}
...
...
doc/sphinx/glossary/index.rst
View file @
e4a0af76
...
...
@@ -76,6 +76,11 @@ Varnish Glossary
the client. When the response is stored in varnishd's cache,
we call it an object.
backend response
The response specifically served from a backend to
varnishd. The backend response may be manipulated in
vcl_fetch.
body
The bytes that make up the contents of the object, varnishd
does not care if they are in HTML, XML, JPEG or even EBCDIC,
...
...
@@ -84,8 +89,8 @@ Varnish Glossary
object
The (possibly) cached version of a backend response. Varnishd
receives a reponse from the backend and creates an object,
from which it may
produce
cached responses to clients. If the
backend response is created from
a request which is passed, it
from which it may
deliver
cached responses to clients. If the
object is created as a result of
a request which is passed, it
will not be stored for caching.
.. comment: "configuration of varnishd -----------------------------"
...
...
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