summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-12-30 19:29:38 -0500
committerCraig Andrews <candrews@integralblue.com>2009-12-30 19:29:38 -0500
commit1e9c03e1993b5d2978ac4c5213a8a64e0150b4a2 (patch)
tree3fc25f296e14e75a2afc0fba358301b870f93632 /lib
parent176e0fdab787d7265b58c76ce6312e9f519f4124 (diff)
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)
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index ed81aeba1..df3110ddd 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;
}