summaryrefslogtreecommitdiff
path: root/plugins/MemcachePlugin.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-04 09:01:23 -1000
committerEvan Prodromou <evan@status.net>2010-01-04 09:01:23 -1000
commitb5e0f7d5725d4e106cf9f4b6383e0477a597fac6 (patch)
tree9b004ebacec1b71f724ce9c89e2d1c0fc362024a /plugins/MemcachePlugin.php
parent5a1ea0b9b28138bc4e06d96e2910b0cf3be1eab2 (diff)
parente3466ab51cf68bd62ecd914a3771ed33de824e52 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/MemcachePlugin.php')
-rw-r--r--plugins/MemcachePlugin.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/MemcachePlugin.php b/plugins/MemcachePlugin.php
index acbec135e..78e2b2406 100644
--- a/plugins/MemcachePlugin.php
+++ b/plugins/MemcachePlugin.php
@@ -156,6 +156,11 @@ class MemcachePlugin extends Plugin
}
$this->_conn->addServer($host, $port);
}
+ //Compress items stored in the cache if they're over 2k in size
+ //and the compression would save more than 20%.
+ //Allows the cache to store objects larger than 1MB (if they
+ //compress to less than 1MB), and improves cache memory efficiency.
+ $this->_conn->setCompressThreshold(20000, 0.2);
}
}
}