Copy link to clipboard
Copied
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 ?
Copy link to clipboard
Copied
Scheduled task?
Copy link to clipboard
Copied
Great!
[hurries off to research cf scheduled tasks for first time]
Copy link to clipboard
Copied
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 ?
Copy link to clipboard
Copied
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