X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FCache%2FMemcache.php;h=142ea03593a4f69a517990f2b7c6cefc345d8b62;hb=24f8127938dec80960d388e50fd5b89aa450b494;hp=a1f7539d53aa12b72499e0e0f57f7fe414ddbc2a;hpb=6628866da4eb17b8ff190928d8afdbee11526ae6;p=civicrm-core.git diff --git a/CRM/Utils/Cache/Memcache.php b/CRM/Utils/Cache/Memcache.php index a1f7539d53..142ea03593 100644 --- a/CRM/Utils/Cache/Memcache.php +++ b/CRM/Utils/Cache/Memcache.php @@ -80,9 +80,9 @@ class CRM_Utils_Cache_Memcache { /** * Constructor * - * @param array $config an array of configuration params + * @param array $config an array of configuration params * - * @return void + * @return \CRM_Utils_Cache_Memcache */ function __construct($config) { if (isset($config['host'])) { @@ -107,6 +107,12 @@ class CRM_Utils_Cache_Memcache { } } + /** + * @param $key + * @param $value + * + * @return bool + */ function set($key, &$value) { if (!$this->_cache->set($this->_prefix . $key, $value, FALSE, $this->_timeout)) { return FALSE; @@ -114,15 +120,28 @@ class CRM_Utils_Cache_Memcache { return TRUE; } + /** + * @param $key + * + * @return mixed + */ function &get($key) { $result = $this->_cache->get($this->_prefix . $key); return $result; } + /** + * @param $key + * + * @return mixed + */ function delete($key) { return $this->_cache->delete($this->_prefix . $key); } + /** + * @return mixed + */ function flush() { return $this->_cache->flush(); }