Now here are few notes on how to recompile it (quick and dirty):
- find the source /opt/local/var/db/dports/distfiles/memcached/memcached-1.1.11.tar.gz . Unpack it (ex: on Desktop)
- as suggested in fix., edit the memcached.c file, adding #undef TCP_NOPSH on line 105
- find the location of libevent (which came as part of port install)
- in the folder with patched memcached run
- ./configure --with-libevent=/opt/local/var/db/dports/software/libevent/1.1a_0/opt/local/
- make
- take a look at the original permissions
- copy new file into it's original location by: sudo mv memcached /opt/local/bin/memcached
- restore original permissions : sudo chown root:admin /opt/local/bin/memcached
import memcache
mc = memcache.Client(['127.0.0.1:11211'], debug=0)
mc.set("some_key", "Some value")
value = mc.get("some_key")
Now it will not wait 3 seconds
2 comments:
#undef TCP_NOPSH
should read
#undef TCP_NOPUSH
in the ver I downloaded.
Hi, thanks for update. What exactly is the version you are using?
Cheers!
Post a Comment