search for: cache_erb_frag

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

Did you mean: cache_erb_fr
2006 Nov 05
0
Any workaround for Rails caching?
...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 = buffer.length block.call...
2007 Jul 19
0
xml builder cache (with a slight problem on initial load)
...cache the xml fragment that I needed but came to the quick realization that cache only handle 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...
2005 Mar 10
6
Expiring Cache Fragments and fcgi
First let me say that Rails caching is very very cool. The traffic (and responsiveness) I''ve saved by added 10 lines of ruby code would be enourmous, if I actually had traffic... ;) Sweepers as observers are great, btw. Since every page of my side is dynamic, once I did some DB optimization I''m caching the content of the index page which was taking the bulk of the time to load