Sha256: d9ddb0c721a03fae0648a4cc4ca6e1fd336203fb45c72974915a53df550445df

Contents?: true

Size: 675 Bytes

Versions: 4

Compression:

Stored size: 675 Bytes

Contents

if defined?(Rails)
  Remix::Stash::Runtime.logger = Rails.logger

  module Remix::Stash::RailsSupport
  private

    def cycle_action_vectors
      Remix::Stash.cycle_action
    end

  end

  class ActionController::Base
    include Remix::Stash::RailsSupport
    after_filter :cycle_action_vectors
  end

  if servers = ENV['MEMCACHED_SERVERS']
    Remix::Stash.define_cluster(:environment => servers.split(','))
    stash.default(:cluster => :environment)
  end

  if namespace = ENV['MEMCACHED_NAMESPACE']
    stash.default(:namespace => namespace)
  end

end

unless Remix::Stash::Runtime.logger
  require 'logger'
  Remix::Stash::Runtime.logger = Logger.new(STDERR)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
remix-stash-1.0.4 lib/remix/stash/auto_detection.rb
remix-stash-1.0.3 lib/remix/stash/auto_detection.rb
remix-stash-1.0.2 lib/remix/stash/auto_detection.rb
remix-stash-1.0.1 lib/remix/stash/auto_detection.rb