Esempio n. 1
0
 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, "THE_MEMCACHE_EXTENSION_IS_NOT_AVAILABLE");
     }
     parent::__construct($options);
     $params =& JCacheStorageMemcache::getConfig();
     $this->_compress = isset($params['compression']) ? $params['compression'] : 0;
     $this->_db =& JCacheStorageMemcache::getConnection();
     // Get the site hash
     $this->_hash = $params['hash'];
 }
Esempio n. 2
0
 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, "The memcache extension is not available");
     }
     parent::__construct($options);
     $params =& JCacheStorageMemcache::getConfig();
     $this->_compress = isset($params['compression']) ? $params['compression'] : 0;
     $this->_db =& JCacheStorageMemcache::getConnection();
     // Get the site hash
     $this->_hash = $params['hash'];
 }
Esempio n. 3
0
 /**
  * Constructor
  *
  * @access protected
  * @param array $options optional parameters
  */
 function __construct($options = array())
 {
     if (!$this->test()) {
         return JError::raiseError(404, "The memcache extension is not available");
     }
     parent::__construct($options);
     $params =& JCacheStorageMemcache::getConfig();
     $this->_compress = isset($params['compression']) ? $params['compression'] : 0;
     $this->_db =& JCacheStorageMemcache::getConnection();
     // memcahed has no list keys, we do our own accounting, initalise key index
     if ($this->_db->get($this->_hash . '-index') === false) {
         $empty = array();
         $this->_db->set($this->_hash . '-index', $empty, $this->_compress, 0);
     }
 }