Value Not Updating? Check for Caching!

Here’s today’s dumb mistake: A value that was supposedly updated by a routine on one page, wasn’t changing on another ASP.NET screen. I carefully traced the progress of the update and everything looked right – all the way to the database.

After puzzling over why the value wouldn’t show correctly on the ASP.NET grid, it finally dawned on me:

<%@ OutputCache Duration="30" VaryByParam="none" %>

Ouch! To improve efficiency, I had told the page to cache the output for 30 seconds. The value was updated in the database, but the cache was bypassing the database – at least each time I looked.

Sheesh! Why can’t I think of these things right away instead of much later?!?!

Ken

No Comments