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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Nov 18, 2008 at 10:54 PM, Norman Elton <normelton@gmail.com> wrote:> > 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.> Thanks! > > Norman > > > >-- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 18, 10:58 pm, "Michael Koziarski" <mich...@koziarski.com> wrote:> 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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---