which led to "STORE_DISK_CLIENT == getType()" assertions
when running SMP Squid with non-shared memory caching.
UsingSmp() is not the right condition to detect whether we are using a shared
memory cache because shared memory caching may be disabled and because
Coordinator does not use a shared memory cache even if shared caching is
enabled.
See also: r11821.
* offset 0 in the memory object is the HTTP headers.
*/
- if (mem_status == IN_MEMORY && UsingSmp()) {
+ if (mem_status == IN_MEMORY && Config.memShared && IamWorkerProcess()) {
// clients of an object cached in shared memory are memory clients
return STORE_MEM_CLIENT;
}
if (!Config.onoff.memory_cache_first && swap_status == SWAPOUT_DONE && refcount == 1)
return 0;
- if (UsingSmp()) {
+ if (Config.memShared && IamWorkerProcess()) {
const int64_t expectedSize = mem_obj->expectedReplySize();
// objects of unknown size are not allowed into memory cache, for now
if (expectedSize < 0 ||