jmathai / epiphany

A micro PHP framework that's fast, easy, clean and RESTful. The framework does not do a lot of magic under the hood. It is, by design, very simple and very powerful.
https://github.com/jmathai/epiphany
Other
687 stars 139 forks source link

add support for multiple memcache servers and options to EpiSession #70

Open cgomboz opened 11 years ago

cgomboz commented 11 years ago

Added support to allow for multiple servers and set memcached options.

$hosts = array( 'host1', 'host2' ); $ports = array( 11211, 11212 ); $options = array( Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT, Memcached::OPT_LIBKETAMA_COMPATIBLE => true );

EpiSession::employ( EpiSession::MEMCACHED, $hosts, $ports, false, 86400, $options );

Also supports array of 1 -> N:

EpiSession::employ( EpiSession::MEMCACHED, $hosts );