Merge pull request #4789 from totten/master-test-tx
[civicrm-core.git] / CRM / Utils / Cache / Memcache.php
index a1f7539d53aa12b72499e0e0f57f7fe414ddbc2a..9604e49513b3e1ca825c539881bf4565da35f700 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -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();
   }