Memcached as a storage for PHP sessions

Two ways how to make PHP store sessions in memcached.

  • By mean of writing own arguments for session_set_save_handler().
Advantages: much simple to deploy, exists some working samples.
Handicaps: all existing projects need to be customized, I mean that in all scripts where we make "session_start" we have to include our file with declarations.

  • By the way of writing PECL module.
Advantages: such method can be absolutely transparent for projects.
Handicaps: needs good understanding of PHP API.

Comments