Enable memcache automatic compression, starting at 20k and only if compression gain is greater than 20%.

Allows storage of larger objects (over 1mb in size uncompressed), such as huge LDAP schemas.
Should also improve cache efficiency (allows more stuff to be stored in same memory) and reduce network latency (less data transfer)
This commit is contained in:
Craig Andrews 2009-12-30 19:29:38 -05:00
parent 176e0fdab7
commit 1e9c03e199
1 changed files with 1 additions and 0 deletions

View File

@ -1416,6 +1416,7 @@ function common_memcache()
} else {
$cache->addServer($servers);
}
$cache->setCompressThreshold(20000, 0.2);
}
return $cache;
}