do I need memcache-client
I am on rails 2.3.5 and ruby on 1.8.7. I have a single application using a local memcached (latest version from apt-get memcached) instance. It seems memcached is working as expected but going through the docs and other comments,
1 - It seems memcached-client is re开发者_如何学Pythoncommeneded for speeding things up. I can't tell for sure with my version of rrails/ruby if I really need it or not. Right now I use Rails.cache.read/write/fetch commands. I have installed this gem and I wonder what is interfacing with memcached without this gem and if it's good enough.
Thanks
Rails currently natively uses memcache-client (if available) when you type Rails.cache. So you've got hat working just fine.
Here's a slideshare of memcache with rails, showing its usage: http://www.slideshare.net/guestac752c/caching-memcached-and-rails
As to speed, I quite like some of the quick-and-dirty benchmarks on this tutorial just to make me feel better about cacheing: http://townx.org/rails_and_memcached
It also has an interesting comparison between memcahe-client and Ruby-MemCache gems. Note, however, that the above links are sadly aging (as is everything written about rails)... so take with a pinch of salt :)
精彩评论