Site-wide memcaching

I know I can configure Rails.cache to be backed by memcache, and that I can configure multiple memcache servers for load balancing. Is there any way to configure multiple instances of Rails.cache? In this case, I'd like my application to use a standard memcache server, as well as a starling server.

Ideally, something like Rails.cache[:memcache] vs. Rails.cache[:starling] would point to different servers.

Thoughts?

Thanks!

Norman

I know I can configure Rails.cache to be backed by memcache, and that I can configure multiple memcache servers for load balancing. Is there any way to configure multiple instances of Rails.cache? In this case, I'd like my application to use a standard memcache server, as well as a starling server.

Ideally, something like Rails.cache[:memcache] vs. Rails.cache[:starling] would point to different servers.

Thoughts?

Just use your own code rather than Rails.cache. For one of myprojects I have

QUEUE = MemCache.new("localhost:22122")

And use that from code. No need to do anything with Rails.cache at all.

Actually you might be interested in ActiveSupport::Cache::MemCacheStore instead. It wraps the memcache library and provides an interface that's compatible with Rails.cache's.