Changeset 71ee565 in github


Ignore:
Timestamp:
Jul 30, 2012 3:10:04 AM (10 months ago)
Author:
Aleksander Machniak <alec@…>
Children:
cfc27c9
Parents:
5f8d59c0
Message:

Support connections to memcached socket file (#1488577)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r5f8d59c0 r71ee565  
    22=========================== 
    33 
     4- Support connections to memcached socket file (#1488577) 
    45- Enable TinyMCE inlinepopups plugin 
    56- Update to TinyMCE 3.5.6 
  • config/main.inc.php.dist

    rb1f30d8 r71ee565  
    245245 
    246246// Use these hosts for accessing memcached 
    247 // Define any number of hosts in the form hostname:port 
    248 $rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211' ); 
     247// Define any number of hosts in the form of hostname:port or unix:///path/to/socket.file 
     248$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' ); 
    249249 
    250250// check client IP in session athorization 
  • program/include/rcube.php

    r0afe279 r71ee565  
    194194      $this->mc_available = 0; 
    195195 
    196       // add alll configured hosts to pool 
     196      // add all configured hosts to pool 
    197197      $pconnect = $this->config->get('memcache_pconnect', true); 
    198198      foreach ($this->config->get('memcache_hosts', array()) as $host) { 
    199         list($host, $port) = explode(':', $host); 
    200         if (!$port) $port = 11211; 
     199        if (substr($host, 0, 7) != 'unix://') { 
     200          list($host, $port) = explode(':', $host); 
     201          if (!$port) $port = 11211; 
     202        } 
     203        else { 
     204          $port = 0; 
     205        } 
     206 
    201207        $this->mc_available += intval($this->memcache->addServer($host, $port, $pconnect, 1, 1, 15, false, array($this, 'memcache_failure'))); 
    202208      } 
Note: See TracChangeset for help on using the changeset viewer.