Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.
/*
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?
Hi. We are using memcached and installed it already in my local machine Snow Leopard 10.6.2 but I had a problem in the patches: http://drupal.org/node/660036
Comments
yes
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
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.
Any chance on sharing those
Any chance on sharing those memcache patches?
----------------
Dominic Ryan
www.it-hq.org
code..
Url: http://pecl.php.net/package/memcache
I was also hoping chx could provide with additional information, and maybe code?
morphir.com
That's a good start!
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
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
The link is dead. This is is a very interesting topic, it would be great to see it evolve.
Civicrm is supporting memcached
http://civicrm.org/node/126
I don't have any personal experience with it but looks promising.
As does
As does this;
http://drupal.org/project/memcache
----------------
Dominic Ryan
www.iis-aid.com
Hi. We are using memcached
Hi. We are using memcached and installed it already in my local machine Snow Leopard 10.6.2 but I had a problem in the patches:
http://drupal.org/node/660036
Here is the screenshot of a sample drupal with memcache module:
http://i.imgur.com/NjwxG.jpg
My question is I don't know how to use it. Will it work as is after the installation or do I need to add some code in order for it to work.
Thanks in advance.
Memcache is not always a good
Memcache is not always a good choice. In this article you can read details on whether or not to use memcache in your situation