<span class="gmail_quote">On 8/18/06, <b class="gmail_sendername">yan</b> <<a href="mailto:yan@pritzker.ws">yan@pritzker.ws</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
I'm at the bloody forehead stage, so I figure it's time to ask. After<br>installing the robot coop's memcache-client which everyone apparently<br>recommends, it refuses to work because the rails cache.rb is invoking<br>the read() method on the cache, which it _does not have_. Their library
<br>has get() and put() but no read() and write() as rails expects. What<br>gives? Is everyone quietly writing wrapper libraries around this? No<br>mention on any blogs...help would be greatly appreciated<br><br>My setup from
environment.rb initialize:<br><br> CACHE = MemCache.new :c_threshold => 10_000,:compression =><br>true,:debug => false,:namespace => 'foo',:readonly => false,:urlencode<br>=> false<br> CACHE.servers = 'localhost:11211'
<br><br> config.action_controller.session_store = :mem_cache_store<br> config.action_controller.fragment_cache_store = CACHE, {}<br><br>Incidentally, the session store works with memcache-client, but the<br>fragment cache craps out. I've tried every method on every blog entry
<br>out there that I could find, but they are inconsistent with the rails<br>source code, or I am missing something. Thanks!<br><br>--<br>Posted via <a href="http://www.ruby-forum.com/">http://www.ruby-forum.com/</a>.<br>
_______________________________________________<br>Rails mailing list<br><a href="mailto:Rails@lists.rubyonrails.org">Rails@lists.rubyonrails.org</a><br><a href="http://lists.rubyonrails.org/mailman/listinfo/rails">http://lists.rubyonrails.org/mailman/listinfo/rails
</a><br></blockquote><br>Yan<br><br>I got memcache-client working with memcached-1.1.13-pre-win32 on Windows 2000 machine. My environment.rb look like this <br><br>memcache_options = {<br> :compression => false,
<br> :debug => false,<br> :namespace => "app-#{RAILS_ENV}",<br> :readonly => false,<br> :urlencode => false<br> }
<br>memcache_servers = ["localhost:11211"]<br><br> Rails::Initializer.run do |config|<br>.<br>.<br><br>config.action_controller.session_store = :mem_cache_store<br> config.action_controller.fragment_cache_store
= :mem_cache_store, memcache_options<br>.<br>.<br>end<br><br>CACHE = MemCache.new(memcache_options)<br>CACHE.servers = memcache_servers<br>ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.merge!({ 'cache' => CACHE })
<br><br>then I start my memcached like this<br><br>memcached.exe -vv -p 11211<br><br>hope this helps.<br><br>-daya<br><br><br><br>