This contains implementation of the consistent hash for memcache (client available at https://github.com/bradfitz/gomemcache/). It was written using and for the Go programming language.
$ go get github.com/imega/gomemcache-selector/php-memcache
import (
"github.com/bradfitz/gomemcache/memcache"
"github.com/imega/gomemcache-selector/php-memcache"
)
func main() {
selector := phpmemcache.New("10.0.0.1:11211", "10.0.0.2:11211", "10.0.0.3:11212")
mc := memcache.NewFromSelector(selector)
mc.Set(&memcache.Item{Key: "foo", Value: []byte("my value")})
it, err := mc.Get("foo")
...
}