]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Enable memcache automatic compression, starting at 20k and only if compression gain...
authorCraig Andrews <candrews@integralblue.com>
Thu, 31 Dec 2009 00:29:38 +0000 (19:29 -0500)
committerCraig Andrews <candrews@integralblue.com>
Thu, 31 Dec 2009 00:29:38 +0000 (19:29 -0500)
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)

lib/util.php

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