Alvin Bruney [ASP.NET MVP]
6/26/2008 2:12:00 AM
No it's not because your _cachekey variable will go away when the page is
done processing. Session is the right choice for this.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------
"Madhur" <sf@df.com> wrote in message
news:#hcde2g1IHA.528@TK2MSFTNGP02.phx.gbl...
> Hi All
>
> I want to manage a user specific cache . Specifically , a SiteMapProvider
> root object, since in my application , the site menu is personalized for
> each user.
>
> I want to know if its a good idea to use a cache key created like this:
>
> private string
> _cahekey="sitemapprovider"+HttpContext.Current.Session.SessionID;
>
> This way the key would be different for each user. Or Are there any better
> approaches out there?
>
> Regards,
> Madhur
>