Have anyone tried out memcached?

morphir - January 11, 2006 - 05:52

yes

chx - January 11, 2006 - 05:59

works great. I even have some code for session memcached (mostly written by darix), data memcached , menu memcached, even a patch against taxonomy to cache some expensive functions. NowPublic uses it extensively. Since the v2.0 of PECL client appeared we have not problems, previously we used some PHP client, was not real good.
--
Read my developer blog on Drupal4hu. | The news is Now Public

Any chance on sharing those

brashquido - May 9, 2006 - 21:32

Any chance on sharing those memcache patches?

----------------
Dominic Ryan
www.it-hq.org

code..

morphir - May 24, 2006 - 10:36

Url: http://pecl.php.net/package/memcache

/*
Add these functions to bootstrap.inc and replace the original include_once './includes/session.inc'; with a call to
drupal_memcache_init. $conf['memcache_use'] and $conf['memcache_session'] are switching memcache usage.
$conf['memcache_session_server'] is an array of host:port strings.
*/

function _drupal_memcache_init($m) {
  foreach (variable_get($m .'_server', array('localhost:11211')) as $server) {
    list($server, $port) = explode(':', $server);
    if (!isset($GLOBALS[$m])) {
      $GLOBALS[$m] = new Memcache;
      $GLOBALS[$m]->pconnect($server, $port);
    }
    else {
      $GLOBALS[$m]->addserver($server, $port, TRUE);
    }
  }
}

function drupal_memcache_init() {
  if (variable_get('memcache_use', 0)) {
    _drupal_memcache_init('memcache_session');
    _drupal_memcache_init('memcache_cache');
    _drupal_memcache_init('memcache_menu');
  }
  if (variable_get('memcache_use', 0) && variable_get('memcache_session', 0)) {
    include_once './includes/session-memcache.inc';
  }
  else {
    include_once './includes/session.inc';
  };
}

I was also hoping chx could provide with additional information, and maybe code?

morphir.com

That's a good start!

brashquido - May 24, 2006 - 22:33

That's a good start! Hopefully chx (or someone with Drupal/memcached know how) will see this thread to fill in the blanks...

----------------
Dominic Ryan
www.it-hq.org

Any updates on using

mudanoman - November 13, 2006 - 17:37

Any updates on using Memcache and Drupal?

I did find: http://www.tenpoundsound.com/blog/2005/11/drupal/memcache-drupal-impleme...

Any help appreciated.

Dead link

umonkey - May 14, 2007 - 14:31

The link is dead. This is is a very interesting topic, it would be great to see it evolve.

Civicrm is supporting memcached

mike4miyu - August 16, 2007 - 07:48

http://civicrm.org/node/126

I don't have any personal experience with it but looks promising.

As does

brashquido - August 16, 2007 - 22:27

As does this;

http://drupal.org/project/memcache

----------------
Dominic Ryan
www.iis-aid.com

 
 

Drupal is a registered trademark of Dries Buytaert.