summaryrefslogtreecommitdiff
path: root/plugins/MemcachePlugin.php
diff options
context:
space:
mode:
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);
}
}
}