Module: Immunio::CacheStoreHooks
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/immunio/plugins/action_view.rb
Instance Method Summary collapse
-
#write_with_immunio(name, value, options = nil) ⇒ Object
Rails 5 adds CollectionCaching.
Instance Method Details
#write_with_immunio(name, value, options = nil) ⇒ Object
Rails 5 adds CollectionCaching. When used in the context of rendering a collection of items with a partial template, we need to remove our markers before writing to the cache store. See this blog post for more: blog.bigbinary.com/2016/03/09/rails-5-makes-partial-redering-from-cache-substantially-faster.html
573 574 575 576 577 578 579 580 581 |
# File 'lib/immunio/plugins/action_view.rb', line 573 def write_with_immunio(name, value, = nil) Request.time "plugin", "#{Module.nesting[0]}::#{__method__}" do Template.remove_all_markers! value if value.is_a? String Request.pause "plugin", "#{Module.nesting[0]}::#{__method__}" do write_without_immunio(name, value, ) end end end |