HighTechTalks DotNet Forums  

sqldatasource cache expiration

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss sqldatasource cache expiration in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Brian
 
Posts: n/a

Default sqldatasource cache expiration - 10-24-2007 , 12:01 PM






I have an sqldatasource bound to a gridview control. I have caching enabled
(60 seconds). I have enabled sorting on the gridview and when I select the
column everything works as expected. The data is retrieved from the cache and
never goes back to the database. However, if the user wants to perform
another query (by setting some dropdown/checkbox etc. and then pressing a
button on the form, I do the following:

1. On the click event for the button I set EnableCaching for the grid
sqldatasource to false.
2. On the datasource Selecting event I reset the EnableCaching to true.

The correct data is retrieved and displayed in the page...but if the user
then goes and tries to re-sort the grid with the new data he will get the
older dataset.

What is the correct way to clear the sqldatasource cached info from the
cache when I process the button click?

thanks

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.