]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
It apparently was a BAD idea to have storeHashInsert() move PRIVATE
authorwessels <>
Wed, 2 Sep 1998 11:56:45 +0000 (11:56 +0000)
committerwessels <>
Wed, 2 Sep 1998 11:56:45 +0000 (11:56 +0000)
entries to the tail of the LRU list.  Instead, lets try doing that
in storeUnlockObject when the lock count is zero.

src/store.cc

index 53e0ef548b9d4a669ce9dcb923339cb3f692c1b3..f199ff2359a39fe4c6604bb5328137a2ccabbb24 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.450 1998/08/21 08:57:07 wessels Exp $
+ * $Id: store.cc,v 1.451 1998/09/02 05:56:45 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -179,10 +179,7 @@ storeHashInsert(StoreEntry * e, const cache_key * key)
        e, storeKeyText(key));
     e->key = storeKeyDup(key);
     hash_join(store_table, (hash_link *) e);
-    if (EBIT_TEST(e->flag, KEY_PRIVATE))
-       dlinkAddTail(e, &e->lru, &store_list);
-    else
-       dlinkAdd(e, &e->lru, &store_list);
+    dlinkAdd(e, &e->lru, &store_list);
 }
 
 static void
@@ -262,8 +259,13 @@ storeUnlockObject(StoreEntry * e)
        storeSetMemStatus(e, IN_MEMORY);
        requestUnlink(e->mem_obj->request);
        e->mem_obj->request = NULL;
-    } else
+    } else {
        storePurgeMem(e);
+       if (EBIT_TEST(e->flag, KEY_PRIVATE)) {
+           dlinkDelete(&e->lru, &store_list);
+           dlinkAddTail(e, &e->lru, &store_list);
+       }
+    }
     return 0;
 }