Sha256: 4f0f0bccdec9978738c080b09914f4d273ad6a2ee842a828c5f4a6384a49d873

Contents?: true

Size: 741 Bytes

Versions: 4

Compression:

Stored size: 741 Bytes

Contents

if defined?(Rails)
  require 'active_support/cache/remix_stash_store'
  
  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(','))
    Remix.stash.default(:cluster => :environment)
  end

  if namespace = ENV['MEMCACHED_NAMESPACE']
    Remix.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.1.3 lib/remix/stash/auto_detection.rb
remix-stash-1.1.2 lib/remix/stash/auto_detection.rb
remix-stash-1.1.1 lib/remix/stash/auto_detection.rb
remix-stash-1.1.0 lib/remix/stash/auto_detection.rb