Sha256: 8ed73b4006696af56b45348a339a43f2158ae7088d9d4fa5fd0059cb5d82d808

Contents?: true

Size: 773 Bytes

Versions: 12

Compression:

Stored size: 773 Bytes

Contents

module RulesEngine
  module Cache
    # Configuration examples (MemoryStore is the default):
    #
    #   RulesEngine::SelectorCache.cache_store = :memory_store
    #   RulesEngine::SelectorCache.cache_store = :file_store, "/path/to/cache/directory"
    #   RulesEngine::SelectorCache.cache_store = :drb_store, "druby://localhost:9192"
    #   RulesEngine::SelectorCache.cache_store = :mem_cache_store, "localhost"
    #   RulesEngine::SelectorCache.cache_store = MyOwnStore.new("parameter")

    class << self
      def perform_caching?
        !@cache_store.nil? 
      end

      def cache_store=(store_option)
        @cache_store = ActiveSupport::Cache.lookup_store(store_option)
      end

      def cache_store
        @cache_store 
      end
    end
    
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rules_engine-0.3.2 lib/rules_engine/cache.rb
rules_engine-0.3.1 lib/rules_engine/cache.rb
rules_engine-0.3.0 lib/rules_engine/cache.rb
rules_engine-0.2.0 lib/rules_engine/cache.rb
rules_engine-0.1.10 lib/rules_engine/cache.rb
rules_engine-0.1.9 lib/rules_engine/cache.rb
rules_engine-0.1.8 lib/rules_engine/cache.rb
rules_engine-0.1.7 lib/rules_engine/cache.rb
rules_engine-0.1.6 lib/rules_engine/cache.rb
rules_engine-0.1.5 lib/rules_engine/cache.rb
rules_engine-0.1.4 lib/rules_engine/cache.rb
rules_engine-0.1.3 lib/rules_engine/cache.rb