solution. Still, I wonder why CMS guys chose that approach for User
> Hi Gabriele,
>
> you could do a different approach:
> implement a new varyon... and check if the current user is authenticated.
> If yes, then create a new random key. this will ensure that a new instance
> is served.
> For guests always render the same key.
>
> How to implement this is here:
>
http://weblogs.asp.net/stefan_gossner/archive/2003/12/23/45417.aspx >
> Please be aware that this will cause lots of copies to be stored in output
> cache so it might not scale very well....
>
> Cheers,
> Stefan.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
> "Gabriele Cannata" <g_cannataNOSPAM@hotmail.com> wrote in message
> news:eft29Ew#DHA.688@tk2msftngp13.phx.gbl...
> > Hi Stefan, actually to execute some logic, you must actually process the
> > page. What we had in mind was to enable OutputCache on all pages, and
then
> > add a HttpModule to check for some kind of authentication (eg. a cookie)
> and
> > in the case the user is authenticate, disable caching forcing asp.net to
> > process the page, while for anonymous letting the default behaviour of
> > OutputCacheModule to serve the request from the Cache.
> > What we weren't able to do was to force the OutputCacheModule to not
serve
> > the request from the cache just for some pages.
> >
> > I'm thinkingabout implementing a
> > "OnPreRequestHandlerExecute"/"OnPostRequestHandlerExecute" to avoid
> caching
> > of request coming from authenticated user, but it's not clear to me the
> > right way to go.
> >
> > For CMS guys:
> >
> > In CMS, curiously, to disable caching of controls in authoring mode, you
> can
> > use "VaryByCustom=CmsControl" which actually
> > causes GetvaryByCustomString to give a continuosly incrementing integer,
> so
> > that for every request you get a new cache entry.
> > This could be a way to forcing the execution of a page, but the memory
> waste
> > would be worse than caching for each user visiting the site.
> >
> > Any comment?
> >
> > "Stefan [MSFT]" <stefang@online.microsoft.com> ha scritto nel messaggio
> > news:%23ta$24v%23DHA.3500@tk2msftngp13.phx.gbl...
> > > Hi Gabriele,
> > >
> > > you could add some logic to the template to check if currently an
> > > authenticated users is logged in and display different content.
> > > Or create a parallel channel and redirect to this when the user is
> > > authenticated.
> > >
> > > Cheers,
> > > Stefan.
> > >
> > > --
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > >
> > >
> > > "Gabriele Cannata" <g_cannataNOSPAM@hotmail.com> wrote in message
> > > news:eDpbwuv#DHA.2476@TK2MSFTNGP12.phx.gbl...
> > > > Sorry if this is a FAQ,
> > > > we have a site that is mainly visited by anonymous users, and we
have
> > some
> > > > complex pages (they are really CMS templates, by the way).
> > > > We are thinking about the possibility of caching only the "guest"
> > version
> > > of
> > > > a page, while processing the page for each authenticated users. Is
it
> > > > possible?
> > > >
> > > > Gabriele
> > > >
> > > >
> > >
> > >
> >
> >
>
>