git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3179
d4fa192b-c00b-0410-8231-
f00ffab90ce4
#define ASSERT_CLI() do {assert(pthread_self() == cli_thread);} while (0)
/* cache_expiry.c */
-void EXP_Insert(struct object *o, double now);
+void EXP_Insert(struct object *o);
void EXP_Init(void);
void EXP_Rearm(const struct object *o);
void EXP_Touch(const struct object *o, double now);
sp->obj->cacheable = 1;
if (sp->obj->objhead != NULL) {
VRY_Create(sp);
- assert(!isnan(sp->wrk->used));
- EXP_Insert(sp->obj, sp->wrk->used);
+ EXP_Insert(sp->obj);
HSH_Unbusy(sp);
}
sp->wrk->acct.fetch++;
*/
void
-EXP_Insert(struct object *o, double now)
+EXP_Insert(struct object *o)
{
struct objexp *oe;
add_objexp(o);
oe = o->objexp;
- oe->lru_stamp = now;
+ assert(o->entered != 0 && !isnan(o->entered));
+ oe->lru_stamp = o->entered;
update_object_when(o);
LOCK(&exp_mtx);
binheap_insert(exp_heap, oe);