LRU-Touch objcts for OA_VARY

varnish-cache does not touch objects for OA_VARY, but we need
to keep FCOs in memory which are frequently used during lookup.

Thoughts on why this should not race LRU:

- lru_list is owned by lru_mtx
- object can't go away, because
  - for call from hash, we hold the oh->mtx
  - otherwise, we hold a ref
parent 491339c2
......@@ -1029,8 +1029,13 @@ sfemem_getattr(struct worker *wrk, struct objcore *memoc, enum obj_attr attr,
assert_memstv(stvfe, stv);
r = fellow_cache_obj_getattr(stvfe->fc, fco, attr, &len);
if (slen)
*slen = (ssize_t)len;
if (attr == OA_VARY)
(void) fellow_cache_obj_lru_touch(stvfe->fc, fco);
return (r);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment