Sha256: 9175bda7189b75891cba5c1d82a85cccfc2f257fefb8069189dfc08f3a31c23d

Contents?: true

Size: 606 Bytes

Versions: 2

Compression:

Stored size: 606 Bytes

Contents

module ShuntCache
  class Railtie < ::Rails::Railtie

    initializer 'shunt_cache.set_cache_store' do |app|
      require 'socket'
      ShuntCache::Status.configure do |status|
        status.cache = Rails.cache
        status.key = [
          Rails.application.class.name.deconstantize,
          "shunt_cache",
          Socket.gethostname
        ].join(":")
        status.logger = Rails.logger
      end
    end

    initializer 'shunt_cache.middleware' do |app|
      app.middleware.use ShuntCache::Middleware
    end

    rake_tasks do
      load 'shunt_cache/shunt_cache.rake'
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shunt_cache-0.1.0 lib/shunt_cache/railtie.rb
shunt_cache-0.0.2 lib/shunt_cache/railtie.rb