Merge pull request #6132 from colemanw/CRM-16795
[civicrm-core.git] / CRM / Utils / Cache.php
index d2aaf38dbc06c700b7cb29272c712890a2801c54..abe356bab3e8ce9d7a96866eb50f9adf77b71809 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -43,12 +43,11 @@ class CRM_Utils_Cache {
    * pattern and cache the instance in this variable
    *
    * @var object
-   * @static
    */
   static private $_singleton = NULL;
 
   /**
-   * Constructor
+   * Constructor.
    *
    * @param array $config
    *   An array of configuration params.
@@ -60,11 +59,9 @@ class CRM_Utils_Cache {
   }
 
   /**
-   * Singleton function used to manage this object
+   * Singleton function used to manage this object.
    *
    * @return object
-   * @static
-   *
    */
   public static function &singleton() {
     if (self::$_singleton === NULL) {
@@ -86,7 +83,6 @@ class CRM_Utils_Cache {
 
       // a generic method for utilizing any of the available db caches.
       $dbCacheClass = 'CRM_Utils_Cache_' . $className;
-      require_once str_replace('_', DIRECTORY_SEPARATOR, $dbCacheClass) . '.php';
       $settings = self::getCacheSettings($className);
       self::$_singleton = new $dbCacheClass($settings);
     }
@@ -94,13 +90,12 @@ class CRM_Utils_Cache {
   }
 
   /**
-   * Get cache relevant settings
+   * Get cache relevant settings.
    *
    * @param $cachePlugin
    *
    * @return array
    *   associative array of settings for the cache
-   * @static
    */
   public static function getCacheSettings($cachePlugin) {
     switch ($cachePlugin) {
@@ -166,4 +161,5 @@ class CRM_Utils_Cache {
     }
     return $defaults;
   }
+
 }