Ah ok I'm already using NCache - so does the second-level cache cache
queries as well as objects?  if so, then its already doing what I need
it to!

On Feb 7, 3:53 am, Fabio Maulo <[email protected]> wrote:
> http://nhforge.org/doc/nh/en/index.html#performance-cache
>
> 2009/2/6 reach4thelasers <[email protected]>
>
>
>
>
>
> > Hey guys,
>
> > On the home page of my web site I have a list of the most popular
> > forum discussions and articles on the web site at the moment.  The
> > list is generated by a linq to nhibernate or HQL query every time the
> > page is loaded.
>
> > Now that my number of impressions is going up, I would like to cache
> > these queries so that they only hit the database every once every 10
> > minutes or so, and between updates just display the cached data to the
> > user.
>
> > I can't think how to do it though.  I thought maybe a singleton that
> > stores the data in the application cache and runs the query again if a
> > certain time has expired - but don't think it would work.  I don't
> > even know if the second level cache accomodates for this
> > automaically??
>
> > Can anyone suggest a patten to do this?
>
> > thanks,
>
> > Kevin.
>
> --
> Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to