Merge pull request #4789 from totten/master-test-tx
[civicrm-core.git] / CRM / Utils / Cache / Memcache.php
index 9d223b3d9965282f79c39a13ed34e230fd3050e6..9604e49513b3e1ca825c539881bf4565da35f700 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -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();
   }