Sha256: 64491f61fb49d58d603f883be3e3405a33622319cfbae387a04f2bd3e13344e5

Contents?: true

Size: 357 Bytes

Versions: 10

Compression:

Stored size: 357 Bytes

Contents

module Rbexy
  class CacheComponent < Rbexy::Component
    def setup(key:)
      @key = key
    end

    def call
      @current_template = view_context.instance_variable_get(:@current_template)

      capture do
        cache @key, virtual_path: @current_template.virtual_path do
          @output_buffer << content
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rbexy-2.0.0.rc5 lib/rbexy/cache_component.rb
rbexy-2.0.0.rc4 lib/rbexy/cache_component.rb
rbexy-2.0.0.rc3 lib/rbexy/cache_component.rb
rbexy-2.0.0.rc2 lib/rbexy/cache_component.rb
rbexy-2.0.0.rc1 lib/rbexy/cache_component.rb
rbexy-2.0.0.beta9 lib/rbexy/cache_component.rb
rbexy-2.0.0.beta8 lib/rbexy/cache_component.rb
rbexy-2.0.0.beta7 lib/rbexy/cache_component.rb
rbexy-2.0.0.beta6 lib/rbexy/cache_component.rb
rbexy-2.0.0.beta5 lib/rbexy/cache_component.rb