Sha256: 6c7e22d44a6d61157b86626cff23c8a3fee3658c2c1435f6ea762c771a37a3af

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

require "rails_connector/core_extensions.rb"
require "rails_connector/date_attribute.rb"
require "active_support/core_ext/numeric/time"

# require "infopark_component_cache/guards/always_consistent"
# require "infopark_component_cache/guards/never_consistent"
require "infopark_component_cache/guards/value_present"
require "infopark_component_cache/guards/cms_state_guard"

require "infopark_component_cache/guards/last_changed"
require "infopark_component_cache/guards/obj_count"
require "infopark_component_cache/guards/valid_from"
require "infopark_component_cache/guards/valid_until"

require "infopark_component_cache/guards/delayed_last_changed"
require "infopark_component_cache/guards/delayed_obj_count"
require "infopark_component_cache/guards/delayed_valid_from"
require "infopark_component_cache/guards/delayed_valid_until"

require "infopark_component_cache/key_generator"
require "infopark_component_cache/consistency_guard"
require "infopark_component_cache/cache_storage"
require "infopark_component_cache/component"
require "infopark_component_cache/component_cache"

require "infopark_fiona_connector"

module InfoparkComponentCache
  # @!scope class
  # This parameter should be initialized to the root object
  # class of the project. It defaults to "::Obj".
  mattr_accessor :obj_root_class

  # @author Tomasz Przedmojski <tomasz.przedmojski@infopark.de>
  class Engine < Rails::Engine
    initializer "component_cache.helpers" do
      config.after_initialize do
        ActiveSupport.on_load(:action_view) do
          include InfoparkComponentCacheHelper
        end
      end
    end

    config.after_initialize do
      InfoparkComponentCache.obj_root_class ||= ::Obj
      CmsStateGuard.obj_root_class = InfoparkComponentCache.obj_root_class
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
infopark_component_cache-5.0.2 lib/engine.rb