Skip to main content
Inspiring
August 11, 2011
Question

query caching at specific time of day ?

  • August 11, 2011
  • 1 reply
  • 609 views

I'm currently using:

cachedwithin=#CreateTimeSpan(1,0,0,0)#

If I'm happy my data won't change during the day, is it possible to cache a query at a pre-determined time, eg. during the early hours when I know it's unlikely anyone is on the site, say 5am ? That way,I know the query is cached and ready for anyone who asked for it ?

    This topic has been closed for replies.

    1 reply

    Inspiring
    August 11, 2011

    Scheduled task?

    Inspiring
    August 11, 2011

    I'm guessing it's common for a website to cache some of it's queries at an off peak time ?

    Otherwise, the first person to run that query would have the inevitable wait of a couple of seconds while the query is processed ?

    Inspiring
    August 11, 2011

    Yup.  We run a bunch of scheduled tasks between 2-5am each day to refresh and cache various bits and pieces.

    But if you've got queries that are on the front-end of a website that take a coupla seconds to run, I'd be checking the query's execution plan.  That's really pretty slow.

    --

    Adam