rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2011-Feb-17 12:57 UTC
Page Caching... extending it???
Hey there Is it possible to intercept Action Cache to force it to use a specified filename to save to.... or to load a specified cached file that is different to the current one expected for the URL? I guess this is some sort of "extending" of action cache.... but I cannot find much in google :) thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2011-Feb-17 21:31 UTC
Re: Page Caching... extending it???
Any clues anyone? On Feb 17, 11:57 pm, "rails.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <rails.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey there > > Is it possible to intercept Action Cache to force it to use a > specified filename to save to.... or to load a specified cached file > that is different to the current one expected for the URL? > > I guess this is some sort of "extending" of action cache.... but I > cannot find much in google :) > > thanks-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Interesting idea, but I''d ask the question, why would you want to do this? Is there a real-world performance bottleneck your trying to fix that wouldn''t be addressed with the standard page, action or fragment caching ? Luke On 2011-02-17, at 1:31 PM, rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Any clues anyone? > > On Feb 17, 11:57 pm, "rails.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <rails.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> Hey there >> >> Is it possible to intercept Action Cache to force it to use a >> specified filename to save to.... or to load a specified cached file >> that is different to the current one expected for the URL? >> >> I guess this is some sort of "extending" of action cache.... but I >> cannot find much in google :) >> >> thanks > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2011-Feb-18 06:51 UTC
Re: Page Caching... extending it???
I need multiple cached versions of one page (/url) ..... tracked in memcache..... and I want to directly dump a page cache based on a condition Yes I know there are better ways to do this in rails..... but I have bad architecture to work with So a light wrapper around Action Cache would be super awesome! .... I just can''t see anyone doing this On Feb 18, 1:25 pm, Luke Cowell <lcow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Interesting idea, but I''d ask the question, why would you want to do this? Is there a real-world performance bottleneck your trying to fix that wouldn''t be addressed with the standard page, action or fragment caching ? > > Luke > > On 2011-02-17, at 1:31 PM, rails.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > > > > > > > > Any clues anyone? > > > On Feb 17, 11:57 pm, "rails.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <rails.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > >> Hey there > > >> Is it possible to intercept Action Cache to force it to use a > >> specified filename to save to.... or to load a specified cached file > >> that is different to the current one expected for the URL? > > >> I guess this is some sort of "extending" of action cache.... but I > >> cannot find much in google :) > > >> thanks > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
is it a version manager your want, something that lets you go back to a previous page version? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2011-Feb-18 14:45 UTC
Re: Page Caching... extending it???
Not a version manager Its more about selecting content for different circumstances Being able to cache different versions for a page/url and select it in logic contained in a Action Cache wrapper seems the most appropriate I''m just wondering if anyone knows of example of extending Action Cache in a similar way, I''m not sure where to begin On Feb 18, 11:35 pm, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> is it a version manager your want, something that lets you go back to a > previous page version?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2011-Feb-18 15:42 UTC
Re: Page Caching... extending it???
I guess this could also be done by implementing some sort of Fragment Cache... wrapping a whole page Just not sure where to begin... I don''t want to reinvent rails caching... just want to tweak it with a simple conditional + have control on the file cache storage -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Could you just do something like this: <% cache(:action => "list", :controller => "blah", :style => "new") do %> # code that renders in either mode conditionally <% end %> You could also look at using something like cells, which has caching built in and might be flexible enough to cache and render 2 different views under the same action (depending on the circumstances). Luke On 2011-02-18, at 7:42 AM, rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> I guess this could also be done by implementing some sort of Fragment > Cache... wrapping a whole page > > Just not sure where to begin... I don''t want to reinvent rails > caching... just want to tweak it with a simple conditional + have > control on the file cache storage > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote in post #982493:> I guess this could also be done by implementing some sort of Fragment > Cache... wrapping a whole page > > Just not sure where to begin... I don''t want to reinvent rails > caching... just want to tweak it with a simple conditional + have > control on the file cache storage+1 to fragment caching, as it is an easy-peasy solution to implement -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
rails.nerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2011-Feb-20 09:11 UTC
Re: Page Caching extending it?
Thanks for the replies guys. I think I might be on the right track now The documentation says: "Pressing shift-reload in the browser will cue the browser and Varnish to regenerate the page, regardless of the cache state." http://devcenter.heroku.com/articles/http-caching That goes against expectation... hope it''s an error :) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.