From: Michael Fellinger Date: 2009-04-05T01:36:09+09:00 Subject: Re: [ANN] Localmemcache-0.2.0: The beauty of memcached. For local data. Blazingly fast. On Tue, 31 Mar 2009 08:17:45 +0900 "Sven C. Koehler" wrote: > Hi, > > I am happy to announce the next version of localmemcache (0.2.0), a > library that aims to provide an interface similar to memcached but for > accessing local data instead of remote data. It's based on mmap()'ed > shared memory for maximum speed. This sounds great, can't wait to add it as a caching option to Ramaze. > * http://localmemcache.rubyforge.org/ > > Changes for 0.2.0: > * Localmemcache uses logging now: In case your application is > terminated while accessing the shared memory (eg by a kill -9), > localmemcache is now able to restore the integrity of your data. > * \0 character can now be used in keys and values > * The ruby binding now features a keys() method. > * Added a C API. > > 0.2.0 facts: > - lightweight: The core library is just about 1300 lines of C code > - fast: About 40% slower than Ruby's hash (or about 36 times > faster than a local memcached). > > EXAMPLE > ======= > > require 'localmemcache' > $lm = LocalMemCache.new :namespace => "viewcounters" > $lm[:foo] = 1 > $lm[:foo] > $lm.delete(:foo) I tried that, but $lm[:foo] always returned nil. That's on ArchLinux, both 32 and 64bit. -- ^ manveru