]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Removed stale IamWorkerProcess() check and XXX: Caller checks that already.
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 11 May 2011 22:27:19 +0000 (16:27 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 11 May 2011 22:27:19 +0000 (16:27 -0600)
Polished.

src/MemStore.cc

index 867447481904503b00ff7cb0d60973dff69fb05f..15154365969216b9d9dc1129c0d0497efeb5caba 100644 (file)
@@ -33,18 +33,17 @@ MemStore::init() {
     if (entryLimit <= 0)
         return; // no memory cache configured or a misconfiguration
 
-    if (IamWorkerProcess()) { // XXX: coordinator should not create MemStore
-        const int64_t diskMaxSize = Store::Root().maxObjectSize();
-        if (diskMaxSize == -1) {
-            debugs(20, DBG_IMPORTANT, "WARNING: disk-cache maximum object size "
-                   "is unlimited but mem-cache maximum object size is " <<
-                   Ipc::Mem::PageSize() / 1024.0 << " KB");
-        } else if (diskMaxSize > maxObjectSize()) {
-            debugs(20, DBG_IMPORTANT, "WARNING: disk-cache maximum object size "
-                   "is too large for mem-cache: " <<
-                   diskMaxSize / 1024.0 << " KB > " <<
-                   maxObjectSize() / 1024.0 << " KB");
-        }
+    const int64_t diskMaxSize = Store::Root().maxObjectSize();
+    const int64_t memMaxSize = maxObjectSize();
+    if (diskMaxSize == -1) {
+        debugs(20, DBG_IMPORTANT, "WARNING: disk-cache maximum object size "
+               "is unlimited but mem-cache maximum object size is " <<
+               memMaxSize / 1024.0 << " KB");
+    } else if (diskMaxSize > memMaxSize) {
+        debugs(20, DBG_IMPORTANT, "WARNING: disk-cache maximum object size "
+               "is too large for mem-cache: " <<
+               diskMaxSize / 1024.0 << " KB > " <<
+               memMaxSize / 1024.0 << " KB");
     }
 
     map = new MemStoreMap(ShmLabel);