Installed memcached via homebrew, how to start and stop server?

When you installed it, it put a file named homebrew.mxcl.memcached.plist in /usr/local/Cellar/memcached/$version/; you copy that file into ~/Library/LaunchAgents and then tell launchd to start it with launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist. If you were watching the console carefully during the brew install command, it should have said something about doing these exact steps. If you run … Read more

How do I tell Spring cache not to cache null value in @Cacheable annotation

Hooray, as of Spring 3.2 the framework allows for this using Spring SPEL and unless. Note from the java doc surrounding Cacheable: http://static.springsource.org/spring/docs/3.2.x/javadoc-api/org/springframework/cache/annotation/Cacheable.html public abstract String unless Spring Expression Language (SpEL) attribute used to veto method caching. Unlike condition(), this expression is evaluated after the method has been called and can therefore refer to the … Read more

configure: error: C compiler cannot create executables

I have 10.8 installed and Xcode 4.4 with Command Line tools, and yet I was still getting this error. Rather than reinstall Xcode, I noticed there were two relevant lines in my config.log: configure:5130: checking for C compiler version configure:5139: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc –version >&5 That path did not exist for me. Instead I had: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain The … Read more

If redis is already a part of the stack, why is Memcached still used alongside Redis?

The main reason I see today as an use-case for memcached over Redis is the superior memory efficiency you should be able to get with plain HTML fragments caching (or similar applications). If you need to store different fields of your objects in different memcached keys, then Redis hashes are going to be more memory … Read more

Can I get Memcached running on a Windows (x64) 64bit environment?

North Scale labs have released a build of memcached 1.4.4 for Windows x64: http://blog.couchbase.com/memcached-windows-64-bit-pre-release-available http://labs.northscale.com/memcached-packages/ UPDATE: they have recently released Memcached Server – still FREE but enhanced distro with clustering, web-based admin/stats UI etc. (I’m not related to them in any way) Check it out at http://northscale.com/products/memcached.html and download at: http://www.northscale.com/download.php?a=d UPDATE 2: NorthScale Memcached … Read more

How do you know if memcached is doing anything?

You could use the official perl script: memcached-tool 127.0.0.1:11211 stats Or just use telnet and the stats command e.g.: # telnet localhost [memcacheport] Trying 127.0.0.1… Connected to localhost. Escape character is ‘^]’. stats STAT pid 2239 STAT uptime 10228704 STAT time 1236714928 STAT version 1.2.3 STAT pointer_size 32 STAT rusage_user 2781.185813 STAT rusage_system 2187.764726 STAT … Read more