Skip to content

Commit 208eb01

Browse files
committed
fix cacahe implementatation to work with all methods
1 parent 3d3bf91 commit 208eb01

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

lib/view_component/base.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def config
5050

5151
attr_accessor :__vc_original_view_context
5252

53-
# TODO
53+
# Compoents can have a cache key that is used to cache the rendered output.
5454
#
5555
# @return [String]
5656
def cache_key
@@ -333,8 +333,6 @@ def __vc_render_in_block_provided?
333333
defined?(@view_context) && @view_context && @__vc_render_in_block
334334
end
335335

336-
337-
# TODO
338336
def __vc_render_template(rendered_template)
339337
# Avoid allocating new string when output_preamble and output_postamble are blank
340338
if output_preamble.blank? && output_postamble.blank?

lib/view_component/cache_on.rb

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)