Support » Plugin: Memcached Object Cache » Configure to work with socket

  • I was trying configure to this plugin work on socket as the following:

    // ** Memcache settings **//
     $memcached_servers = array(
     	'default' => array(
      // ''

    but it do not working for me. Anyone,can you help me solved this problem?
    I had configure to work with TCP via ip and default port 11211 and its working fine.
    In addition, I tested with some code as the following and it working fine too:

    ini_set('display_errors', true);
    $mc = new Memcache;
     $mc->addServer("unix:///var/run/memcached/memcached.sock", 0);
    $ttl = 60;
    $data = "This is data";
    $key = "ABCDEDF";
    $mc->set($key, $data, 0, $ttl);
    $mcData = $mc->get($key);
    var_dump("Data from memcached: " . $mcData);


  • The topic ‘Configure to work with socket’ is closed to new replies.