Memcached

Hi guys, I remember using memcached in the past, but after the 2.1 release I can't figure out how I'm suppose to configured it with different environments. Cache_fu had a memcached.yml in config/, but I can't find how to configure it if for example I want a single small test memcached server in dev mode, and a few distributed servers in production.

Does someone know of documentation or examples on how to configure it ?

TIA,   ngw

I have it on good authority that ActiveSupport::Cache is a good way to go in Rails 2.1 and beyond (e.g. Rails 3.0 supports it, backward compatible).

This interface supports many implementations, including CloudCache if you’re on EC2 - see e.g. getCloudCache.com , in particular the video shows how to configure.

Hope this help,

Marc

I seem to remember having this problem, too.

We just configure it in our <environment>.rb file.

So in development.rb you might have: config.cache_store = :mem_cache_store, 'big_host1', 'big_host2', etc...

http://thewebfellas.com/blog/2008/6/9/rails-2-1-now-with-better-integrated-caching

Doh! Meant to say:

So in development.rb you might have: config.cache_store = :mem_cache_store, 'small_host'

So in production.rb you might have: config.cache_store = :mem_cache_store, 'big_host1', 'big_host2', etc...

http://thewebfellas.com/blog/2008/6/9/rails-2-1-now-with-better-integrated-caching