Adds a setting to cache textile rendering (off by default).
* it uses ActionController cache store which is MemoryStore by default and can be configured with config.action_controller.cache_store * macro processing was moved out of textile rendering so that it doesn't get cached * no noticeable improvement is expected for small portions of text, so only texts larger than 2KB are cached git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3372 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -396,13 +396,14 @@ module ApplicationHelper
|
||||
text = args.shift
|
||||
when 2
|
||||
obj = args.shift
|
||||
text = obj.send(args.shift).to_s
|
||||
attr = args.shift
|
||||
text = obj.send(attr).to_s
|
||||
else
|
||||
raise ArgumentError, 'invalid arguments to textilizable'
|
||||
end
|
||||
return '' if text.blank?
|
||||
|
||||
text = Redmine::WikiFormatting.to_html(Setting.text_formatting, text) { |macro, args| exec_macro(macro, obj, args) }
|
||||
text = Redmine::WikiFormatting.to_html(Setting.text_formatting, text, :object => obj, :attribute => attr) { |macro, args| exec_macro(macro, obj, args) }
|
||||
|
||||
only_path = options.delete(:only_path) == false ? false : true
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
<p><%= setting_select :text_formatting, Redmine::WikiFormatting.format_names.collect{|name| [name, name.to_s]}, :blank => :label_none %></p>
|
||||
|
||||
<p><%= setting_check_box :cache_formatted_text %></p>
|
||||
|
||||
<p><%= setting_select :wiki_compression, [['Gzip', 'gzip']], :blank => :label_none %></p>
|
||||
|
||||
<p><%= setting_text_field :feeds_limit, :size => 6 %></p>
|
||||
|
||||
Reference in New Issue
Block a user