]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
More cache manager initialization calls reshuffling.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 11 Jul 2008 19:11:44 +0000 (21:11 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 11 Jul 2008 19:11:44 +0000 (21:11 +0200)
src/ProfStats.cc
src/ipcache.cc
src/main.cc
src/net_db.cc
src/redirect.cc
src/refresh.cc
src/stat.cc
src/store.cc
src/store_digest.cc

index eb9506fa8f91e3aa49f8d9929aa0b770d6d8d436..74cafb185dc8829c8d72008fec328c996a2a8bf8 100644 (file)
@@ -269,6 +269,8 @@ static hrtime_t now;
 static void
 xprof_Init(void)
 {
+    xprofRegisterWithCacheManager();
+
     if (xprof_inited)
         return;
 
index 6f2045cf4999ddb97062dcf894050bc313f7aa42..2564723d9a52c0bf9e209828e4bf4ed184a5cf0c 100644 (file)
@@ -806,6 +806,8 @@ ipcache_init(void)
     n = hashPrime(ipcache_high / 4);
     ip_table = hash_create((HASHCMP *) strcmp, n, hash4);
     memDataInit(MEM_IPCACHE_ENTRY, "ipcache_entry", sizeof(ipcache_entry), 0);
+
+    ipcacheRegisterWithCacheManager();
 }
 
 /// \ingroup IPCacheAPI
index 6694e5260b0ae697d6a6f63dbf751db6054789e2..3461bfcc9714a7f6791cf34e650cf53c7276ca08 100644 (file)
@@ -1010,25 +1010,24 @@ mainInitialize(void)
         idnsRegisterWithCacheManager();
 #endif
 
-        ipcacheRegisterWithCacheManager();
+        // ipcacheRegisterWithCacheManager(); //moved to ipcache_init()
         Mem::RegisterWithCacheManager();
-        netdbRegisterWitHCacheManager();
+        // netdbRegisterWitHCacheManager(); //moved to netdbInit()
         PconnModule::GetInstance()->registerWithCacheManager();
-        redirectRegisterWithCacheManager();
-        refreshRegisterWithCacheManager();
-        statRegisterWithCacheManager();
-        storeDigestRegisterWithCacheManager();
+        // redirectRegisterWithCacheManager(); //moved to redirectInit()
+        // refreshRegisterWithCacheManager(); //moved to refreshInit()
+        // statRegisterWithCacheManager(); //moved to statInit()
+        // storeDigestRegisterWithCacheManager(); //moved to storeDigestInit()
         StoreFileSystem::RegisterAllFsWithCacheManager();
-        storeRegisterWithCacheManager();
+        // storeRegisterWithCacheManager(); //moved to storeInit()
         storeLogRegisterWithCacheManager();
 #if DEBUGSTRINGS
 
         StringRegistry::Instance().registerWithCacheManager();
 #endif
 
-#if    USE_XPROF_STATS
-
-        xprofRegisterWithCacheManager();
+#if USE_XPROF_STATS
+        // xprofRegisterWithCacheManager(); //moved to xprof_init()
 #endif
 
     }
index 06f18c77f173d89bc06b5b904f5270da4f5189ab..fe38729b024f90da01ee41b68450378ee8c24e10 100644 (file)
@@ -894,6 +894,8 @@ netdbInit(void)
 #if USE_ICMP
     int n;
 
+    netdbRegisterWitHCacheManager();
+
     if (addr_table)
         return;
 
index ccae37073d99980ef121ac6a4ebcd4ff280abcdb..e5c311cf55cef9f7b1e710b8bf82fac1605f8428 100644 (file)
@@ -181,6 +181,8 @@ redirectInit(void)
 {
     static int init = 0;
 
+    redirectRegisterWithCacheManager();
+
     if (!Config.Program.redirect)
         return;
 
index ddd3e686dda04773b86e6a1780ff050b59a0a22b..399023b0a7c164539fd252180b9734eaccd41d4f 100644 (file)
@@ -596,6 +596,8 @@ refreshInit(void)
     DefaultRefresh.min = REFRESH_DEFAULT_MIN;
     DefaultRefresh.pct = REFRESH_DEFAULT_PCT;
     DefaultRefresh.max = REFRESH_DEFAULT_MAX;
+
+    refreshRegisterWithCacheManager();
 }
 
 void
index f9b2649142e86c91bfd249c97222ea37698d94c7..c73fd0edd6dd488deb52df1f99e4611339c97a65 100644 (file)
@@ -1026,6 +1026,8 @@ statInit(void)
     ClientActiveRequests.head = NULL;
 
     ClientActiveRequests.tail = NULL;
+
+    statRegisterWithCacheManager();
 }
 
 void
index f22c4cba504fa8b679891a3abcd9e6c1c196ec6c..0463a19977995afd8bd8b5bbd4aec0c915e9041d 100644 (file)
@@ -1397,6 +1397,8 @@ storeInit(void)
     eventAdd("storeLateRelease", storeLateRelease, NULL, 1.0, 1);
     Store::Root().init();
     storeRebuildStart();
+
+    storeRegisterWithCacheManager();
 }
 
 void
index 8185bbad84602e4942272e71152eda429918134a..01e131fdf13a91d759398d598362bb3377c29bf0 100644 (file)
@@ -108,6 +108,8 @@ static void storeDigestAdd(const StoreEntry *);
 void
 storeDigestInit(void)
 {
+    storeDigestRegisterWithCacheManager();
+
 #if USE_CACHE_DIGESTS
     const int cap = storeDigestCalcCap();