From 601f087dae142a406a2a61221f8bdf2f03591938 Mon Sep 17 00:00:00 2001 From: John Mullanaphy Date: Thu, 19 Sep 2013 17:10:25 -0400 Subject: [PATCH] Added the ability to change protected $compression. --- Client/MemcacheClient.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Client/MemcacheClient.php b/Client/MemcacheClient.php index 33417b6..71902fa 100644 --- a/Client/MemcacheClient.php +++ b/Client/MemcacheClient.php @@ -125,7 +125,7 @@ public function get($key) { if ($this->isSafe()) { $key = $this->prefix . $key; - return $this->mem->get($key); + return $this->mem->get($key, $this->compression); } return false; @@ -197,4 +197,14 @@ public function setPrefix($prefix) { $this->prefix = $prefix; } + + /** + * Set the Memcache compression flag for sets/gets + * + * @param int $flag + */ + public function setCompression($flag) + { + $this->compression = $flag; + } }