From: wessels <> Date: Sun, 26 Jul 1998 13:01:18 +0000 (+0000) Subject: Changed where we move PRIVATE entries to the TAIL of the LRU list. X-Git-Tag: SQUID_3_0_PRE1~2967 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d5bd7c414c1663cd4f60beab7a4918ef0783a9c9;p=thirdparty%2Fsquid.git Changed where we move PRIVATE entries to the TAIL of the LRU list. Instead of doing it in storeExpireNow, now we do it in storeHashInsert. this saves double calls to dlink routines. private entries which later become public should be safe because they will become public before they are fully unlocked --- diff --git a/src/store.cc b/src/store.cc index 0046d82071..2f66bcd85d 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.437 1998/07/26 06:39:25 wessels Exp $ + * $Id: store.cc,v 1.438 1998/07/26 07:01:18 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -176,7 +176,10 @@ storeHashInsert(StoreEntry * e, const cache_key * key) e, storeKeyText(key)); e->key = storeKeyDup(key); hash_join(store_table, (hash_link *) e); - dlinkAdd(e, &e->lru, &store_list); + if (EBIT_TEST(e->flag, KEY_PRIVATE)) + dlinkAddTail(e, &e->lru, &store_list); + else + dlinkAdd(e, &e->lru, &store_list); } static void @@ -361,8 +364,6 @@ storeExpireNow(StoreEntry * e) { debug(20, 3) ("storeExpireNow: '%s'\n", storeKeyText(e->key)); e->expires = squid_curtime; - dlinkDelete(&e->lru, &store_list); - dlinkAddTail(e, &e->lru, &store_list); } /* Append incoming data from a primary server to an entry. */ @@ -1035,6 +1036,7 @@ storeBufferFlush(StoreEntry * e) { EBIT_CLR(e->flag, DELAY_SENDING); InvokeHandlers(e); + storeCheckSwapOut(e); } void