Sha256: 2035bdc6fff2e56f95a5f15ed5a0c7820ed653526bda2d9b4593f3073fe3977a

Contents?: true

Size: 588 Bytes

Versions: 7

Compression:

Stored size: 588 Bytes

Contents

module CanTango
  class Configuration
    class Engines
      class Cache < Engine

        def compile state
          raise "Must be set to :on or :off" if ![:on, :off].include? state
          @compile = state
        end

        def compile?
          @compile ||= :on
          @compile == :on
        end

        def store &block
          @store ||= ns::Store.new
          # CanTango::Ability::Cache::MonetaCache
          @store.default_class ||= CanTango::Ability::Cache::SessionCache
          yield @store if block
          @store
        end
      end
    end
  end
end


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cantango-0.9.4.7 lib/cantango/configuration/engines/cache.rb
cantango-0.9.4.6 lib/cantango/configuration/engines/cache.rb
cantango-0.9.4.5 lib/cantango/configuration/engines/cache.rb
cantango-0.9.4.3 lib/cantango/configuration/engines/cache.rb
cantango-0.9.4.2 lib/cantango/configuration/engines/cache.rb
cantango-0.9.4.1 lib/cantango/configuration/engines/cache.rb
cantango-0.9.4 lib/cantango/configuration/engines/cache.rb