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
a583d0c6
Commit
a583d0c6
authored
Sep 05, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the lru timestamp to objcore. Not sure how we managed to forget
that in obj.
parent
0ea83286
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
cache.h
bin/varnishd/cache/cache.h
+2
-2
cache_expire.c
bin/varnishd/cache/cache_expire.c
+2
-2
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+3
-4
No files found.
bin/varnishd/cache/cache.h
View file @
a583d0c6
...
@@ -428,6 +428,7 @@ struct objcore {
...
@@ -428,6 +428,7 @@ struct objcore {
unsigned
timer_idx
;
unsigned
timer_idx
;
VTAILQ_ENTRY
(
objcore
)
list
;
VTAILQ_ENTRY
(
objcore
)
list
;
VTAILQ_ENTRY
(
objcore
)
lru_list
;
VTAILQ_ENTRY
(
objcore
)
lru_list
;
double
last_lru
;
VTAILQ_ENTRY
(
objcore
)
ban_list
;
VTAILQ_ENTRY
(
objcore
)
ban_list
;
struct
ban
*
ban
;
struct
ban
*
ban
;
};
};
...
@@ -595,7 +596,6 @@ struct object {
...
@@ -595,7 +596,6 @@ struct object {
struct
exp
exp
;
struct
exp
exp
;
double
last_modified
;
double
last_modified
;
double
last_lru
;
struct
http
*
http
;
struct
http
*
http
;
...
@@ -836,7 +836,7 @@ void EXP_Set_keep(struct exp *e, double v);
...
@@ -836,7 +836,7 @@ void EXP_Set_keep(struct exp *e, double v);
double
EXP_Ttl
(
const
struct
req
*
,
const
struct
object
*
);
double
EXP_Ttl
(
const
struct
req
*
,
const
struct
object
*
);
double
EXP_Grace
(
const
struct
req
*
,
const
struct
object
*
);
double
EXP_Grace
(
const
struct
req
*
,
const
struct
object
*
);
void
EXP_Insert
(
struct
object
*
o
);
void
EXP_Insert
(
const
struct
object
*
o
);
void
EXP_Inject
(
struct
objcore
*
oc
,
struct
lru
*
lru
,
double
when
);
void
EXP_Inject
(
struct
objcore
*
oc
,
struct
lru
*
lru
,
double
when
);
void
EXP_Init
(
void
);
void
EXP_Init
(
void
);
void
EXP_Rearm
(
const
struct
object
*
o
);
void
EXP_Rearm
(
const
struct
object
*
o
);
...
...
bin/varnishd/cache/cache_expire.c
View file @
a583d0c6
...
@@ -216,7 +216,7 @@ EXP_Inject(struct objcore *oc, struct lru *lru, double when)
...
@@ -216,7 +216,7 @@ EXP_Inject(struct objcore *oc, struct lru *lru, double when)
*/
*/
void
void
EXP_Insert
(
struct
object
*
o
)
EXP_Insert
(
const
struct
object
*
o
)
{
{
struct
objcore
*
oc
;
struct
objcore
*
oc
;
struct
lru
*
lru
;
struct
lru
*
lru
;
...
@@ -227,7 +227,7 @@ EXP_Insert(struct object *o)
...
@@ -227,7 +227,7 @@ EXP_Insert(struct object *o)
HSH_Ref
(
oc
);
HSH_Ref
(
oc
);
assert
(
o
->
exp
.
entered
!=
0
&&
!
isnan
(
o
->
exp
.
entered
));
assert
(
o
->
exp
.
entered
!=
0
&&
!
isnan
(
o
->
exp
.
entered
));
o
->
last_lru
=
o
->
exp
.
entered
;
o
c
->
last_lru
=
o
->
exp
.
entered
;
lru
=
oc_getlru
(
oc
);
lru
=
oc_getlru
(
oc
);
CHECK_OBJ_NOTNULL
(
lru
,
LRU_MAGIC
);
CHECK_OBJ_NOTNULL
(
lru
,
LRU_MAGIC
);
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
a583d0c6
...
@@ -171,10 +171,9 @@ cnt_deliver(struct worker *wrk, struct req *req)
...
@@ -171,10 +171,9 @@ cnt_deliver(struct worker *wrk, struct req *req)
req
->
t_resp
=
W_TIM_real
(
wrk
);
req
->
t_resp
=
W_TIM_real
(
wrk
);
if
(
!
(
req
->
obj
->
objcore
->
flags
&
OC_F_PRIVATE
))
{
if
(
!
(
req
->
obj
->
objcore
->
flags
&
OC_F_PRIVATE
))
{
if
((
req
->
t_resp
-
req
->
obj
->
last_lru
)
>
if
((
req
->
t_resp
-
req
->
obj
->
objcore
->
last_lru
)
>
cache_param
->
lru_timeout
&&
cache_param
->
lru_timeout
&&
EXP_Touch
(
req
->
obj
->
objcore
))
EXP_Touch
(
req
->
obj
->
objcore
))
req
->
obj
->
objcore
->
last_lru
=
req
->
t_resp
;
req
->
obj
->
last_lru
=
req
->
t_resp
;
if
(
!
cache_param
->
obj_readonly
)
if
(
!
cache_param
->
obj_readonly
)
req
->
obj
->
last_use
=
req
->
t_resp
;
/* XXX: locking ? */
req
->
obj
->
last_use
=
req
->
t_resp
;
/* XXX: locking ? */
}
}
...
...
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