private function cache_driver()
 {
     if (empty(self::$_cache_driver)) {
         require_once "class.basecache.php";
         try {
             self::$_cache_driver = CacheProviderFactory::get_provider('memcached');
         } catch (Exception $e) {
             # Memcached not supported.
             self::$_cache_driver = CacheProviderFactory::get_provider('memory');
         }
     }
     return self::$_cache_driver;
 }
Exemple #2
0
 public function cache_driver()
 {
     if (isset($this->cache_driver)) {
         return $this->cache_driver;
     }
     # Check for memcached enabled
     require_once "class.basecache.php";
     try {
         $this->cache_driver = CacheProviderFactory::get_provider('memcached');
     } catch (Exception $e) {
         # Memcached not supported.
         $this->cache_driver = CacheProviderFactory::get_provider('session');
     }
     return $this->cache_driver;
 }