search for: cachehelper

Displaying 3 results from an estimated 3 matches for "cachehelper".

2011 Jul 15
0
Writing test for CacheHelper
Hi, I''m working to patch actionpack/lib/action_view/helpers/ cache_helper.rb so that it doesn''t throw when ouput_buffer isn''t ActionView::OutputBuffer but is still html_safe. In 3-0-stable the function contains the following if: if output_buffer.is_a?(ActionView::OutputBuffer) safe_output_buffer = output_buffer.to_str fragment =
2006 Nov 05
0
Any workaround for Rails caching?
...th error is because a lot of Rails'' internals still > assume ERB, which uses a different buffer structure to Markaby. I''ll > try to get it working soon. > > Cheers, > Tim Do you have any ideas how to approach it? Looking at Rails'' code: # Called by CacheHelper#cache def cache_erb_fragment(block, name = {}, options = nil) unless perform_caching then block.call; return end buffer = eval("_erbout", block.binding) if cache = read_fragment(name, options) buffer.concat(cache) else pos = buff...
2007 Jul 19
0
xml builder cache (with a slight problem on initial load)
...andle ERB/RHTML files. Needless to say, I have spent some time creating an XML fragment cache for rxml files. A slight problem with it though. Let me present the code. It is derived directly from the cache and cache_erb_fragment routines. <code>module ActionView module Helpers module CacheHelper def cache_xml(xml, name ={}, &block) @controller.cache_xml_fragment(block, xml, name) end end end end module ActionController module Caching module Fragments def cache_xml_fragment(block, xml, name = {}, options = nil) unless perform_caching then b...