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
8070f329
Commit
8070f329
authored
Jun 26, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make EXP_Ttl() take a pointer to struct exp rather than struct object
parent
d299d768
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_expire.c
bin/varnishd/cache/cache_expire.c
+4
-4
cache_hash.c
bin/varnishd/cache/cache_hash.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
8070f329
...
...
@@ -928,7 +928,7 @@ extern pthread_t cli_thread;
/* cache_expiry.c */
void
EXP_Clr
(
struct
exp
*
e
);
double
EXP_Ttl
(
const
struct
req
*
,
const
struct
object
*
);
double
EXP_Ttl
(
const
struct
req
*
,
const
struct
exp
*
);
double
EXP_When
(
const
struct
exp
*
exp
);
void
EXP_Insert
(
struct
objcore
*
oc
);
void
EXP_Inject
(
struct
objcore
*
oc
,
struct
lru
*
lru
,
double
when
);
...
...
bin/varnishd/cache/cache_expire.c
View file @
8070f329
...
...
@@ -76,14 +76,14 @@ EXP_Clr(struct exp *e)
*/
double
EXP_Ttl
(
const
struct
req
*
req
,
const
struct
object
*
o
)
EXP_Ttl
(
const
struct
req
*
req
,
const
struct
exp
*
e
)
{
double
r
;
r
=
o
->
exp
.
ttl
;
r
=
e
->
ttl
;
if
(
req
!=
NULL
&&
req
->
d_ttl
>
0
.
&&
req
->
d_ttl
<
r
)
r
=
req
->
d_ttl
;
return
(
o
->
exp
.
t_origin
+
r
);
return
(
e
->
t_origin
+
r
);
}
/*--------------------------------------------------------------------
...
...
@@ -468,7 +468,7 @@ exp_expire(struct exp_priv *ep, double now)
CHECK_OBJ_NOTNULL
(
o
,
OBJECT_MAGIC
);
VSLb
(
&
ep
->
vsl
,
SLT_ExpKill
,
"EXP_Expired x=%u t=%.0f"
,
oc_getxid
(
&
ep
->
wrk
->
stats
,
oc
)
&
VSL_IDENTMASK
,
EXP_Ttl
(
NULL
,
o
)
-
now
);
EXP_Ttl
(
NULL
,
&
o
->
exp
)
-
now
);
(
void
)
HSH_DerefObjCore
(
&
ep
->
wrk
->
stats
,
&
oc
);
return
(
0
);
}
...
...
bin/varnishd/cache/cache_hash.c
View file @
8070f329
...
...
@@ -430,7 +430,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
if
(
o
->
vary
!=
NULL
&&
!
VRY_Match
(
req
,
o
->
vary
))
continue
;
if
(
EXP_Ttl
(
req
,
o
)
>=
req
->
t_req
)
{
if
(
EXP_Ttl
(
req
,
&
o
->
exp
)
>=
req
->
t_req
)
{
/* If still valid, use it */
assert
(
oh
->
refcnt
>
1
);
assert
(
oc
->
objhead
==
oh
);
...
...
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