Alright, here is the thing..
My question is simple… If “cachedWithin” caches the query for specific time and “cachedAfter” caches the query after a specific time, then how do I cache a query “after 2 hours from now and cache it for 10 minutes?”
I want to cache a query after 2 hours from now and cache it for 10 minutes.. I’ve been following Fast Track to ColdFusion 9 but it doesn’t have any example for my requirement.
Please help me with this. Any help will be appreciated…
Thanks!
Well, that’s an interesting tag.
So, what cachedafter is doing is saying that the query will be static after a specific time.
So, the following code would start to cache the query after 3PM server time today.
More commonly, cachedwithin is telling Cold Fusion to only run this query every 6 hours. I normally use this for data which might not be changing too often or data which takes a long time to load.
Better Explanation