I'm assuming that the database hit is potentially going to cause an issue someday. Why can't you cache it *and* write some invalidation routine which your "rebuild" function kicks off. Basically you need some kind of signal that the cache is invalid. You could that via an application variable. It stores the date/time that the cache is valid to. Your page just checks this against the current date/time to determine whether to hit the DB again. If it does hit the DB, then it updates the app variable to be the current date/time. Your "rebuild now" code just resets this variable in the same way, causing the next page load to invalidate the cache and reload from the database. Cheers Ken -----Original Message----- From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Todd Richards Sent: Tuesday, 7 April 2009 8:58 AM To: 'Jay Turley'; thelist at lists.evolt.org Subject: Re: [thelist] Options for a dynamic menu Hi Jay - I had thought about that, and still might look at it. While I can certainly afford the "hit" once a day, my other concern would be if they were making changes, then had to wait to see them. That's why I had thought about a "build" button. Todd -----Original Message----- From: Jay Turley [mailto:jayturley at gmail.com] Sent: Monday, April 06, 2009 5:47 PM To: todd at promisingsites.com; thelist at lists.evolt.org Subject: Re: [thelist] Options for a dynamic menu Why not cache it? Rebuild it once a day or once at the frequency you need? Just a thought. On Mon, Apr 6, 2009 at 3:40 PM, Todd Richards <todd at promisingsites.com> wrote: > Hi Everyone - > > I have an ASP classic website that was just moved over to a Windows 2008 > server running MS SQL 2008. The site has a "library" where the CSS tree > menu is pulled from a database. It's seldom updated, so I hate that there > has to be a query hit every time someone goes to the site. I switched it to > a static menu, where I make the change when they make changes to the > categories/order. However, this is a PITA as well. > > My thought - which I need feedback and ideas on - is to have a "Rebuild > Menu" button on the page where they manage the categories. After they make > changes, they "build" the new menu, which then writes out the menu to a file > which is included in the ASP page via server side includes. Just not sure > what all I need to consider when doing this, or what the best next step is. > > Thanks for any thoughts. > > Todd > > > > -- > > * * Please support the community that supports you. * * > http://evolt.org/help_support_evolt/ > > For unsubscribe and other options, including the Tip Harvester > and archives of thelist go to: http://lists.evolt.org > Workers of the Web, evolt ! > -- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt !