• HOME
  • ABOUT ME

www.jeremyfrench.co.uk

  • tags
  • my photos
Activity Stream › jeremyfrench's Activity Stream › 502

Answer by Jeremy French for Implementation of Drupal Memcache in custom modules

jeremyfrench — Mon, 01/25/2010 - 09:54

Once set up correctly the memcache module overrides the standard Drupal cache functions, so your module dosen't need to be memcache aware. It will use memcache on systems with it enabled and standard Drupal db caching elsewhere.

The memcache module requires a bit more work to enable than most other modules.

These are the broad steps you need to
take in order to use this software.
Order is important.

  1. Install the memcached binaries on your server. See How to install
    Memcache on Debian Etch or How to
    install Memcache on OSX
  2. Install the PECL memcache extension for PHP.
  3. In php.ini set memcache.hash_strategy="consistent".
  4. Put your site into offline mode.
  5. Download and install the memcache module.
  6. If you have previously been running the memcache module, run
    update.php.
  7. Apply the DRUPAL-5-cache-serialize.patch that
    comes with the module to your Drupal
    installation.
  8. Start at least one instance of memcached on your server.
  9. Edit settings.php to configure the servers, clusters and bins that
    memcache is supposed to use.
    1. Edit settings.php to include either memcache.inc or
      memcache.db.inc. For example,
      $conf['cache_inc']
      ='sites/all/modules/memcache/memcache.db.inc';
    2. Bring your site back online.

Once installed and running you can telnet to the memcache instance on your server (11211 I belive is the default port) and type get *cache-key* to see if your data has been cached.

See original: User Jeremy French - Stack Overflow Answer by Jeremy French for Implementation of Drupal Memcache in custom modules

Activity Stream

July 30, 2010

  • Twitter jeremyfrench tweeted "JFrenchTweet: Good end to the week. Got something working well before I left. Then did grocery shopping from the train with the #ocado Android app." 5:09pm #
  • User Jeremy French - Stack Overflow jeremyfrench posted Answer by Jeremy French for In Drupal 7, how do I show a new form that can edit data selected from a different form? 9:19am#

July 29, 2010

  • foursquare jeremyfrench checked in at Cafe Nero1:38pm#

July 28, 2010

  • User Jeremy French - Stack Overflow jeremyfrench posted Answer by Jeremy French for How to get and set the delta value in Drupal 6.x? 3:09pm#
  • User Jeremy French - Stack Overflow jeremyfrench posted Answer by Jeremy French for How to get and set the delta value? 3:09pm#
  • User Jeremy French - Stack Overflow jeremyfrench posted Answer by Jeremy French for Drupal: hiding node titles 12:09pm#
  • User Jeremy French - Stack Overflow jeremyfrench posted Comment by Jeremy French on How to get and set the delta value in Drupal 6.x? 12:05pm#
  • User Jeremy French - Stack Overflow jeremyfrench posted Comment by Jeremy French on How to get and set the delta value? 12:05pm#
  • User Jeremy French - Stack Overflow jeremyfrench posted Comment by Jeremy French on In Drupal 6, what's the quickest way to set up a WYSIWYG editor with code syntax highlighting and image upload? 10:22am#
  • Twitter jeremyfrench tweeted "JFrenchTweet: Facebook introduces "Questions", will this be a competitor to the stack exchange sites or another yahoo answers?" 9:15am #

Links

  • Tags
  • my photos

Powered by Drupal, an open source content management system
  • tags
  • my photos