The code you posted shows the query to be in the variables scope, not the request scope. Turn on de-bugging to see if you are running a cached copy or not.
I can't change any settings (shared hosting), but I can do it locally tonight on my home machine. I'll see if I can reproduce the problem locally too. Thanks!
Alright, here's what I get from the debugging output (locally):
FeaturedPic (Datasource=cw_data, Time=0ms, Records=1, Cached Query) in /var/www/includes/cydebar.cfm @ 18:25:17.017
So it looks like it is indeed cached. And if I close out of my browser, wait ten minutes, then open that same page back up, I get the same pic (expected). However, on my shared host, if I close out of my browser, wait ten minutes (or so) then open the page back up, different pic. Hmmmm...
1 person found this helpful
Caching is done at the server level. Only so much RAM is allocated to the cache and if it gets full, the next entry kicks out the oldest one, or something like that. This might be what is happening to you.
Ah, I hadn't even considered that. With a shared host, it's entirely possible.
I'll just live with it the way it is. My primary goal is not to have the featured pic change with each page load, and it accomplishes that fine.
Thanks for the input!