lib/curly/template_handler.rb in curly-templates-2.1.1 vs lib/curly/template_handler.rb in curly-templates-2.2.0

- old
+ new

@@ -25,14 +25,13 @@ presenter_key = presenter.class.cache_key else presenter_key = nil end - options = { - expires_in: presenter.cache_duration - } + cache_options = presenter.cache_options || {} + cache_options[:expires_in] ||= presenter.cache_duration - context.cache([key, presenter_key].compact, options) do + context.cache([key, presenter_key].compact, cache_options) do yield end else yield end