Sessions Failover with PHP-memcache against memcached

前端 未结 3 1731
青春惊慌失措
青春惊慌失措 2021-02-08 05:42

Colleagues!

I\'m running php 5.3 (5.3.8) with memcache (2.2.6) client library (http://pecl.php.net/package/memcache) to deal with memcached server. My goal is to have f

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-08 06:24

    Use the Memcached extension. Note that there are two memcache plugins for PHP. One is called Memcache, the other is called Memcached. Yes, that's confusing, but true anyway.

    The Memcache plugin supports those complex URL's you're using, with the protocol identifier (tcp) and the parameters (persistency and so on), while the Memcached plugin supports connection pools.

    The documentation you're mentioning in the comments above (http://www.php.net/manual/en/memcached.sessions.php) is about the Memcached extension, not about Memcache.

    Update: Some interesting read: https://serverfault.com/questions/164350/can-a-pool-of-memcache-daemons-be-used-to-share-sessions-more-efficiently

提交回复
热议问题