Sha256: d3a3f8339f47eb2b61ad74d8856152e2e244f6dd1207c4d272f9aed07b3c43d9
Contents?: true
Size: 643 Bytes
Versions: 1
Compression:
Stored size: 643 Bytes
Contents
class Morlock class MorlockRailtie < ::Rails::Railtie config.after_initialize do if defined?(ActiveSupport::Cache::MemCacheStore) && Rails.cache.is_a?(ActiveSupport::Cache::MemCacheStore) && Rails.cache.instance_variable_get(:@data) Rails.module_eval do class << self def morlock @@morlock ||= Morlock.new(Rails.cache.instance_variable_get(:@data)) end end end else Rails.logger.warn "WARNING: Morlock detected that you are not using the Rails ActiveSupport::Cache::MemCacheStore. Rails.morlock will not be setup." end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
morlock-0.0.1 | lib/morlock/rails.rb |