Question
cachedwithin Not Working
I have a single template page that's used to generate about
20 pages. Within it I have a query that pulls products assigned to
that category and displays them in list of "Top 10" based on the
number of times they've been viewed. As this can get kinda hairy
for the database to render in real-time I've cached the query using
"cachedwithin"; it's currently set to remain cached 6 hours.
With debugging turned on I can actually sit and refresh any of the pages generated by this template, and every fifth or sixth refresh I see it run the query again, rather than use the cached result. I know in order for ColdFusion to use a cached query the SQL statement itself can't change at all, and while I'm using some dates in my query, I've formatted it to not include hours, minutes, or seconds so that the query remains the same for an entire day. The query name doesn't have to be different, does it? That wouldn't make sense, and would be a pain considering I'm using one template to generate 20 pages. ColdFusion Administrator is set to allow up to 100 cached queries, and since only 20 pages are being generated by this template... I'm fine.
Any ideas?
With debugging turned on I can actually sit and refresh any of the pages generated by this template, and every fifth or sixth refresh I see it run the query again, rather than use the cached result. I know in order for ColdFusion to use a cached query the SQL statement itself can't change at all, and while I'm using some dates in my query, I've formatted it to not include hours, minutes, or seconds so that the query remains the same for an entire day. The query name doesn't have to be different, does it? That wouldn't make sense, and would be a pain considering I'm using one template to generate 20 pages. ColdFusion Administrator is set to allow up to 100 cached queries, and since only 20 pages are being generated by this template... I'm fine.
Any ideas?