search for: read_frag

Displaying 11 results from an estimated 11 matches for "read_frag".

Did you mean: head_frag
2006 Aug 18
1
Fragment Caching
Hello. I wouldn''t mind getting some feedback about the use of fragment caching. I''ve got a series of relatively expensive database queries with their respective partials cached and everything is working fine. The problem is that do get this to work I''ve had to move the database queries from the controller into the view layer so as to avoid them being called if the
2006 Aug 03
1
time based caching on rails pages.
Hello, Quick question on caching based on time based expiration. Is this something that rails supports? Is there a way to instruct rails to refetch the new page after a time period or do we actually have to spawn a background process and have it expire the pages. Thanks, Sam. -- Posted via http://www.ruby-forum.com/.
2006 Jun 28
7
caching objects
Hi, i just wanted to say my sorries in advance (sorrie/sorry/sorri)...i have just started learning about the subject of caching, but unfortunately haven''t effictively managed to implement what i had learned. obviously it''s possible to cache a whole page, or action with the caches_page :x or caches_action :y methods, but for some reason it hasn''t really worked with
2008 Mar 06
3
cache_sweeper
Hi, Why is cache_sweeper not a documented method? I was pretty sure it used to be, but I could be wrong. I can''t seem to find any information on it anymore in the online docs. As a side note, looking at the code for cache_sweeper it appears to only work with the :only option, not :except (ignores it)... what''s the reason for this? Thanks, Andrew
2006 Nov 05
0
Any workaround for Rails caching?
...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 write_fragment(name, buffer[pos..-1], options) end end It seems like Markaby might have to have a "length" attribute and/or act like "buffer&quot...
2006 Jan 05
0
Subdomains - redirect to different actions?
...ll these actions is - I''m thinking redirect and render_component aren''t really very nice I''ve also had to resort to my own naming of the fragments - because the default fragment naming includes the full host name with the various subdomains. def all unless read_fragment "post/all" @posts = Post.find(:all,:order=>"earliest DESC") end end ..... def index case @request.subdomains.first when "geek" render_component :action=>"geek" #redirect_to :action=>"geek&qu...
2006 Jan 27
1
Caching from screen scraping
Hi all, I need to do some screen scraping from my rails app. Given an ethernet (MAC) adress, I scrape results from an internal web page that returns location and hostname. How can I cache the result from that screen scraping as to be polite to the scrapee? I would like to expire the results daily. In perl, I would use Cache::File. Can I use rails caching for this? What''s the best
2006 Nov 04
0
mongrel cluster and rails cache.
Hi, I was just wondering, how does a Mongrel cluster maintain Rails cache consistency? For example, how does fragment caching work for multiple mongrel processes? Does the read_fragment(...) function in rails have a locking mechanism? Also, if there''s a Rails cache, how is that synchronized across multiple mongrels? Thanks, Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20...
2007 Jul 19
0
xml builder cache (with a slight problem on initial load)
...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 block.call; return end if cache = read_fragment(name, options) xml << cache else buffer = '''' xml_builder = Builder::XmlMarkup.new(:target=>buffer) block.call(xml_builder) write_fragment(name,buffer, options) xml << buffer end en...
2007 May 29
4
cache everything but...
I saw this older post when searching for information: On Feb 16, 5:10 pm, Ingo Weiss <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > withfragmentcachingonecancacheparts of a page. However, more often > than not what I would need is the exact opposite approach. I would like > to be able to use action cashing and have a mechanism for telling Rails > to
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