Sha256: a17dda7273f2d73f2599a57eec2c9e0e1b3a1221b62a41117a911434df53ea08

Contents?: true

Size: 658 Bytes

Versions: 28

Compression:

Stored size: 658 Bytes

Contents

module Workarea
  module Configuration
    module CacheStore
      extend self

      def load
        if Rails.env.test?
          Rails.application.config.cache_store = :null_store
        elsif !Rails.env.development?
          Rails.application.config.cache_store = :redis_cache_store, {
            url: Workarea::Configuration::Redis.cache.to_url
          }

          require 'redis-rack-cache'
          Rails.application.config.action_dispatch.rack_cache = {
            metastore: Workarea::Configuration::Redis.cache.to_url,
            entitystore: Workarea::Configuration::Redis.cache.to_url
          }
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.26 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.25 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.23 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.22 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.21 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.20 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.19 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.18 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.17 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.16 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.15 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.14 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.13 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.12 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.11 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.10 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.9 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.8 lib/workarea/configuration/cache_store.rb
workarea-core-3.5.7 lib/workarea/configuration/cache_store.rb