Hi, I am coding forum software in rails. In forum software how many times a thread is viewed is an important metric .one way of doing this is creating a before_filter which logs in a view everytime a page is requested. actually just because i need to run this before_filter i can''t do page caching which can drastically improve the performance of the app. can anyone suggest a better way of logging views of every thread. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Maybe with a distinct insert into a history table? thread_views (thread_id int, view_count) outside of the before_filter... somewhere else? Or parsing of the logs? On Jan 28, 1:03 pm, deepu <deepu.kalidi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > I am coding forum software in rails. In forum software how many > times a thread is viewed is an important metric .one way of doing this > is creating a before_filter which logs in a view everytime a page is > requested. > > actually just because i need to run this before_filter i can''t do page > caching which can drastically improve the performance of the app. can > anyone suggest a better way of logging views of every thread.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
sullivan, thanks for the reply. But the very act of inserting into any table means i cannot use page caching which will be aserious performance penalty to pay. i will explore the logs option though. thanks Cheers, Deepu. On Jan 28, 11:15 pm, "sullivan.t" <sulliva...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Maybe with a distinct insert into a history table? thread_views > (thread_id int, view_count) outside of the before_filter... somewhere > else? > > Or parsing of the logs? > > On Jan 28, 1:03 pm, deepu <deepu.kalidi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > I am coding forum software in rails. In forum software how many > > times a thread is viewed is an important metric .one way of doing this > > is creating a before_filter which logs in a view everytime a page is > > requested. > > > actually just because i need to run this before_filter i can''t do page > > caching which can drastically improve the performance of the app. can > > anyone suggest a better way of logging views of every thread.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---