From d5bd7c414c1663cd4f60beab7a4918ef0783a9c9 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Sun, 26 Jul 1998 13:01:18 +0000 Subject: [PATCH] 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 --- src/store.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.47.3