[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.caching

Remove all Cache Items from Site

Kamal Ahmed

5/5/2006 7:10:00 AM

Hi all,

I have a DB driven Web App with Cached Data Grids. I use Cached dataviews
for data grids. Upon closing Site or logging out, I want to clear all the
Caches in my site.

How it could be done... ??


TIA

Muhammad Saleem
CSi


1 Answer

Benjamin Strackany

6/6/2006 6:19:00 PM

0

If you want to clear items from a cache when a user logs out, then you may
want to use Sessions instead of the Cache object.

Regardless, if you want something to happen when a user leaves a site, you
can stick code in the session OnEnd event. It's harder to make something
happen when they close their browser, though -- you'd have to trap the
page's onunload event using javascript, which is a pita.

Ben Strackany
www.developmentnow.com



"Kamal Ahmed" <mhddsaleem@yahoo.com> wrote in message
news:eozO9LBcGHA.1208@TK2MSFTNGP02.phx.gbl...
> Hi all,
>
> I have a DB driven Web App with Cached Data Grids. I use Cached dataviews
> for data grids. Upon closing Site or logging out, I want to clear all the
> Caches in my site.
>
> How it could be done... ??
>
>
> TIA
>
> Muhammad Saleem
> CSi
>
>