# Memcached

**URL:** <https://www.ruby-forum.com/t/memcached/183590>\
**Category:** Rails\
**Created:** [February 17, 2010, 2:01am UTC](https://www.ruby-forum.com/t/memcached/183590 "2010-02-17T02:01:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f17d59/32.png) [@Nicholas\_W](https://www.ruby-forum.com/u/Nicholas_W)\
**Post date:** [February 17, 2010, 2:01am UTC](https://www.ruby-forum.com/t/memcached/183590/1 "2010-02-17T02:01:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nicholas\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f17d59/32.png) [@Nicholas\_W](https://www.ruby-forum.com/u/Nicholas_W)\
**Post date:** [February 17, 2010, 2:13am UTC](https://www.ruby-forum.com/t/memcached/183590/2 "2010-02-17T02:13:56Z")

</div>

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](http://getCloudCache.com) , in particular the video shows how  
to  
configure.

Hope this help,

Marc

On Tue, Feb 16, 2010 at 5:00 PM, Nicholas W. \<

---

<div class="post-metadata">

**Author:** ![Nicholas\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f17d59/32.png) [@Nicholas\_W](https://www.ruby-forum.com/u/Nicholas_W)\
**Post date:** [February 17, 2010, 5:48pm UTC](https://www.ruby-forum.com/t/memcached/183590/3 "2010-02-17T17:48:12Z")

</div>

On Feb 16, 5:00 pm, Nicholas W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 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 ?

I seem to remember having this problem, too.

We just configure it in our .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](http://thewebfellas.com/blog/2008/6/9/rails-2-1-now-with-better-integrated-caching)

* * *

Kurt W.  
I am looking for a new Rails job:  
[http://www.CircleW.org/kurt/pages/resume](http://www.CircleW.org/kurt/pages/resume)

---

<div class="post-metadata">

**Author:** ![Nicholas\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f17d59/32.png) [@Nicholas\_W](https://www.ruby-forum.com/u/Nicholas_W)\
**Post date:** [February 17, 2010, 5:49pm UTC](https://www.ruby-forum.com/t/memcached/183590/4 "2010-02-17T17:49:57Z")

</div>

On Feb 17, 8:46 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> We just configure it in our .rb file.
> 
> So in development.rb you might have:  
> config.cache\_store = :mem\_cache\_store, ‘big\_host1’, ‘big\_host2’, etc…

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](http://thewebfellas.com/blog/2008/6/9/rails-2-1-now-with-better-integrated-caching)

* * *

Kurt W.  
I am looking for a new Rails job:[http://www.CircleW.org/kurt/pages/](http://www.CircleW.org/kurt/pages/)  
resume
