Sha256: 662d9eccd20a84831f58ca0ce85e18209ed1a6693090669ad8b14fa1a692384c

Contents?: true

Size: 877 Bytes

Versions: 5

Compression:

Stored size: 877 Bytes

Contents

require 'logger'
require 'active_support/cache'

require 'multi_solr/version'
require 'multi_solr/solr_filter_simple'
require 'multi_solr/solr_filter_collection'
require 'multi_solr/solr_filter_date'
require 'multi_solr/solr_filter_date_range'
require 'multi_solr/solr_filter_free_query'
require 'multi_solr/filter_value_composite'
require 'multi_solr/search_request'
require 'multi_solr/search_result'
require 'multi_solr/single_core_handler'
require 'multi_solr/timeline_core_handler'

module MultiSolr

  @@logger = nil
  @@cache = nil

  def logger
    return Rails.logger if defined? Rails
    if @@logger.nil?
      @@logger = Logger.new($stdout)
    end
    @@logger
  end


  def cache
    return Rails.cache if defined? Rails
    if @@cache.nil?
      @@cache = ActiveSupport::Cache::MemoryStore.new
    end
    @@cache
  end

  module_function :logger, :cache

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
multi-solr-01.05.00 lib/multi_solr.rb
multi-solr-01.04.00 lib/multi_solr.rb
multi-solr-01.03.00 lib/multi_solr.rb
multi-solr-01.02.01 lib/multi_solr.rb
multi-solr-01.02.00 lib/multi_solr.rb