[master] d3e9232 No LRU for private objects

Nils Goroll nils.goroll at uplex.de
Thu Apr 21 07:46:04 CEST 2016


commit d3e9232618befed3ac8fbf55a71cb4b52aaa274d
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Apr 21 07:42:09 2016 +0200

    No LRU for private objects

diff --git a/bin/varnishd/storage/storage_lru.c b/bin/varnishd/storage/storage_lru.c
index fddd4a0..fc1987a 100644
--- a/bin/varnishd/storage/storage_lru.c
+++ b/bin/varnishd/storage/storage_lru.c
@@ -85,6 +85,10 @@ LRU_Add(struct objcore *oc, double now)
 	struct lru *lru;
 
 	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
+
+	if (oc->flags & OC_F_PRIVATE)
+		return;
+
 	AZ(oc->boc);
 	AN(isnan(oc->last_lru));
 	AZ(isnan(now));
@@ -103,6 +107,10 @@ LRU_Remove(struct objcore *oc)
 	struct lru *lru;
 
 	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
+
+	if (oc->flags & OC_F_PRIVATE)
+		return;
+
 	AZ(oc->boc);
 	lru = lru_get(oc);
 	CHECK_OBJ_NOTNULL(lru, LRU_MAGIC);
@@ -121,7 +129,7 @@ LRU_Touch(struct worker *wrk, struct objcore *oc, double now)
 	CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
 	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
 
-	if (isnan(oc->last_lru))
+	if (oc->flags & OC_F_PRIVATE || isnan(oc->last_lru))
 		return;
 
 	/*



More information about the varnish-commit mailing list