Re: Re-cache when new records are added

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Joe Fallon (jfallon1_at_nospamtwcny.rr.com)
Date: 12/20/04


Date: Sun, 19 Dec 2004 20:10:26 -0500

I implemented DB Cache Dependency in ASP.Net 1.1.
There is a great article that describes how to do it here:
http://www.eggheadcafe.com/articles/20040607.asp
(See my comments at the bottom of this article for improvements in the
published technique.)

This is a great tool to have in your bag of tricks!

-- 
Joe Fallon
"WebMatrix" <WebMatrix@discussions.microsoft.com> wrote in message 
news:E5847098-153F-4989-8503-84AFC1F1D22F@microsoft.com...
> Hello!
>
> I am working on a web application with Windows Authentication.
> In WindowsAuthentication_Authenticate event of Global.asax file a user is
> Authenticated and User/Roles Array is loaded into GenericPrincipal object. 
> So
> User.IsInRole("somerole") can be used. User/Roles Array first retrieved 
> from
> DB through a stored procedure then cached.
> So when new users with roles are added to DB table,
> User.IsInRole("somerole") still uses cached array. It doesn't change 
> untill
> "iisreset".
> Is there way to re-cache upon new record creation? Keep in mind data comes
> from a SQL stored procedure, so table dependency is not an option, or is 
> it?
> Thank you!
>
>
>
> Expand AllCollapse All
>