From: wessels <> Date: Wed, 2 Sep 1998 11:56:45 +0000 (+0000) Subject: It apparently was a BAD idea to have storeHashInsert() move PRIVATE X-Git-Tag: SQUID_3_0_PRE1~2770 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66f07209fdbba89ded502104ed4fb6f3e7068950;p=thirdparty%2Fsquid.git It apparently was a BAD idea to have storeHashInsert() move PRIVATE entries to the tail of the LRU list. Instead, lets try doing that in storeUnlockObject when the lock count is zero. --- diff --git a/src/store.cc b/src/store.cc index 53e0ef548b..f199ff2359 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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; }