Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for advice

Status
Not open for further replies.

KevinFSI

Programmer
Joined
Nov 17, 2000
Messages
582
Location
US
Does anyone see anything wrong with caching a query for a year. I have a some values that only change on Jan 1 of each year. Is there a reason why I wouldn't want to cache the query that retrieves those values and keep it cached for the entire year? Kevin
slanek@ssd.fsi.com
 
as far as i know, it is desirable to cache the queries to limit the connections to the database; i haven't heard of any time limitetions; there is even an attribute -CACHEDAFTER that you can use to specify a certain date and time to use cached query data;
Sylvano
dsylvano@hotmail.com
 
I got all that, I was just trying to think of a reason NOT to do it. I've cached queries for a hour or so, but not a year. Anyway, I decided to go ahead and do it. If for some reason this turns out to be a big mistake, I'll post a message explaining the reason(s) why. Stay tuned... Kevin
slanek@ssd.fsi.com
 
Well, the only things to consider is if your server can handle the memory, and that CF Server can only retain a maximum of 100 queries in the cache (assuming that you've set it to 100 in the admin). Once it reaches the max, it clears the oldest cached query to make room for the new one.

But otherwise, this would be a good practice. - tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top