Sha256: 580bb9d0f1e2c9b6d37c06950de08ef1e27cf21af4527d54a9d392f3204bf177

Contents?: true

Size: 621 Bytes

Versions: 34

Compression:

Stored size: 621 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_store, 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

34 entries across 34 versions & 1 rubygems

Version Path
workarea-core-3.4.45 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.44 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.43 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.42 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.41 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.40 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.39 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.38 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.37 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.36 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.35 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.34 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.33 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.32 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.31 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.30 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.29 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.28 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.27 lib/workarea/configuration/cache_store.rb
workarea-core-3.4.26 lib/workarea/configuration/cache_store.rb