From: Alex Rousskov Date: Wed, 11 May 2011 23:04:21 +0000 (-0600) Subject: Objects of unknown size are allowed into non-shared memory cache X-Git-Tag: take07~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdda553dd0cc58607bbf0e02013a3e14561e5d04;p=thirdparty%2Fsquid.git Objects of unknown size are allowed into non-shared memory cache --- diff --git a/src/store.cc b/src/store.cc index 2113b126ab..c4ffa93b5c 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1443,11 +1443,13 @@ StoreEntry::memoryCachable() const if (!Config.onoff.memory_cache_first && swap_status == SWAPOUT_DONE && refcount == 1) return 0; - const int64_t expectedSize = mem_obj->expectedReplySize(); - // objects of unknown size are not allowed into the memory cache, for now - if (expectedSize < 0 || - expectedSize > static_cast(Config.Store.maxInMemObjSize)) - return 0; + if (UsingSmp()) { + const int64_t expectedSize = mem_obj->expectedReplySize(); + // objects of unknown size are not allowed into memory cache, for now + if (expectedSize < 0 || + expectedSize > static_cast(Config.Store.maxInMemObjSize)) + return 0; + } return 1; }