From: Craig Andrews Date: Thu, 31 Dec 2009 00:29:38 +0000 (-0500) Subject: Enable memcache automatic compression, starting at 20k and only if compression gain... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1e9c03e1993b5d2978ac4c5213a8a64e0150b4a2;p=quix0rs-gnu-social.git 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) --- diff --git a/lib/util.php b/lib/util.php index ed81aeba16..df3110ddd6 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1416,6 +1416,7 @@ function common_memcache() } else { $cache->addServer($servers); } + $cache->setCompressThreshold(20000, 0.2); } return $cache; }