Posted By: Eric Hodel
Date: 2006-01-18 07:44
Summary: memcache-client and cached_model
Project: RC Tools

Two new releases added which help make the websites of The Robot Co-op go fast.

memcache-client is a much faster memcached client than Ruby-memcache (beware if you have both installed with Rails, I don't know what happens). cached_model stores ActiveRecord objects in memcache for speedy retrieval.

Enjoy!

Latest News
v13.5.0 Released !!
    id 774 - 2013-05-18 12:28
Runt v0.9.0 Released
    Matthew Lipper - 2013-05-17 00:11
kramdown 1.0.2 released
    Thomas Leitner - 2013-05-09 06:58
mime-types 1.23 Released
    Austin Ziegler - 2013-04-21 01:41
diff-lcs 1.2.4 Released
    Austin Ziegler - 2013-04-21 00:08

 

Forums | Admin

Discussion Forums: memcache-client-and-cached_model

Start New Thread Start New Thread

 

By: Ron Mayer
Another userful method [ reply ]  
2006-04-06 23:38
I find adding this method during debugging. It sends the "flush_all" command to memcached to help protect against stale data. I find calling it as a ruby function is a bit easier from rake than doign the same through telneting to memcached.

class MemCache
def flush_all
@servers.map{|server|
sock=server.socket
sock.write "flush_all\r\n"
sock.gets
}
end
end