RSS 2.0 Feed
Posted on April 19th, 2011 at 08:34 PM by Corey Ballou

You may or may not be aware, but PHP has two separate module implementations wrapping the memcached (as in memcache daemon) server.
The memcache module utilizes this daemon directly, whereas the memcached module wraps the libMemcached client library and contains some added bonuses.
Both modules have built-in support for session handling, which can be specified in your php.ini file using session.save_handler = memcache[d].

You may see speed improvements if you decide to go with the full-blown install of the memcached module. The primary reason for this would be it’s use of the igbinary PHP extension; a drop in replacement for PHP’s serializer. There is currently a 2.0 beta (RC1) with a number of goodies.

I don’t enjoy re-creating the wheel, so instead I’ve compiled a series of pages I’ve found helpful in the past regarding these two modules for you to make your own decisions.

Memcache/Memcached References

I have compiled a series of the most useful links for your reading pleasure. You’ll be an expert in no time.

Categories PHP, Performance
  • HackerNews
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • del.icio.us
  • Digg
  • StumbleUpon
  • Twitter
Comments 1 comment

One Response

  1. David says:

    Unless you are a high-security site (more than just e-commerce) you should be crowd-sourcing your session management to the users that wish to use your service. Almost every good framework now comes with an encryption class for using encrypted cookies instead of wasting your RAM holding the same information in memcached.

Leave a Reply

Allowable tags
a, abbr, b, blockquote, cite, code, em, i, strike, strong, pre lang, line

* comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.