modolabs / Kurogo-Mobile-Web

Kurogo is a PHP framework for delivering high quality, data driven customizable content to a wide range of mobile devices. Its strengths lie in the customizable system that allows you to adapt content from a variety of sources and easily present that to mobile devices from feature phones, to early generation smart phones, to modern devices and tablets
http://kurogo.org
GNU Lesser General Public License v2.1
198 stars 99 forks source link

Multiple Memcache servers supported. Use config arrays. #40

Closed eebs closed 12 years ago

eebs commented 12 years ago

If an array of hosts are used, but a port string, that port will be used for all hosts. If an array of ports is given with an array of hosts, they will be matched by numerical index. If the hosts array is larger than the ports array, the last element in the ports array will be used to pad the ports array to the size of the hosts array. If the ports array is larger than the hosts array the extra port elements are discarded.

eebs commented 12 years ago

This also has the benefit of not opening a connection to the Memcache server until it's needed. By using addServer instead of connect or pconnect, servers can be added to the pool but without the overhead of connecting until necessary.