Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Newbie: Page level caching in ASP.NET (http://www.velocityreviews.com/forums/t115438-newbie-page-level-caching-in-asp-net.html)

Navin Mishra 12-14-2005 12:59 AM

Newbie: Page level caching in ASP.NET
 
Hi,

How could Page level caching be implemented in ASP.NET ? My ASP.NET page
takes some query arguments and I want page level cache to last for the
lifetime of the page generated using the passed arguments only. If different
arguments are passed, I want new page level cache for the new page. Is it as
simple as adding page level variables ? Note page may query data
asynchronously using AJAX also. Does it change things ?

Thanks and regards

Navin



Karl Seguin 12-14-2005 01:46 AM

Re: Newbie: Page level caching in ASP.NET
 
Ajax shouldn't screw around with anything.

To cache different versions based on querystring values, use the VaryByParam
attribute of the OutputCache control

<%@ OutputCache Duration="3600" VaryByParam="id" %>

assuming "id" is the querystring you want to create a different cache on.

Take a look at:
http://samples.gotdotnet.com/quickst...utcaching.aspx

Karl

--

MY ASP.Net tutorials
http://www.openmymind.net/



"Navin Mishra" <navin.mishra@siemens.com> wrote in message
news:uQ6LgmEAGHA.916@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> How could Page level caching be implemented in ASP.NET ? My ASP.NET page
> takes some query arguments and I want page level cache to last for the
> lifetime of the page generated using the passed arguments only. If
> different
> arguments are passed, I want new page level cache for the new page. Is it
> as
> simple as adding page level variables ? Note page may query data
> asynchronously using AJAX also. Does it change things ?
>
> Thanks and regards
>
> Navin
>
>




Navin Mishra 12-14-2005 01:19 PM

Re: Newbie: Page level caching in ASP.NET
 

Thanks. My qyery string is long passing a bunch of arguments. Would it work
for a combination of query string arguments ? Is there a limit ? I also
wanted simple caching while generated page is active and, to use the cache,
when an action is performed on the page. When page is destroyed, I want to
clear THAT page level cache. Would simple page level variables do that are
garbage collected when Page object is destroyed after ASP.NET page request
completes ?

Thanks again and regards

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uwpW89EAGHA.1256@TK2MSFTNGP15.phx.gbl...
> Ajax shouldn't screw around with anything.
>
> To cache different versions based on querystring values, use the

VaryByParam
> attribute of the OutputCache control
>
> <%@ OutputCache Duration="3600" VaryByParam="id" %>
>
> assuming "id" is the querystring you want to create a different cache on.
>
> Take a look at:
> http://samples.gotdotnet.com/quickst...utcaching.aspx
>
> Karl
>
> --
>
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
>
> "Navin Mishra" <navin.mishra@siemens.com> wrote in message
> news:uQ6LgmEAGHA.916@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > How could Page level caching be implemented in ASP.NET ? My ASP.NET

page
> > takes some query arguments and I want page level cache to last for the
> > lifetime of the page generated using the passed arguments only. If
> > different
> > arguments are passed, I want new page level cache for the new page. Is

it
> > as
> > simple as adding page level variables ? Note page may query data
> > asynchronously using AJAX also. Does it change things ?
> >
> > Thanks and regards
> >
> > Navin
> >
> >

>
>




Navin Mishra 12-20-2005 12:33 PM

Re: Newbie: Page level caching in ASP.NET
 
Comments appreciated! Is it possible ?

Thanks in advance and regards

"Navin Mishra" <navin.mishra@siemens.com> wrote in message
news:%231jq8DLAGHA.3984@TK2MSFTNGP14.phx.gbl...
>
> Thanks. My qyery string is long passing a bunch of arguments. Would it

work
> for a combination of query string arguments ? Is there a limit ? I also
> wanted simple caching while generated page is active and, to use the

cache,
> when an action is performed on the page. When page is destroyed, I want to
> clear THAT page level cache. Would simple page level variables do that are
> garbage collected when Page object is destroyed after ASP.NET page request
> completes ?
>
> Thanks again and regards
>
> "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> wrote in message news:uwpW89EAGHA.1256@TK2MSFTNGP15.phx.gbl...
> > Ajax shouldn't screw around with anything.
> >
> > To cache different versions based on querystring values, use the

> VaryByParam
> > attribute of the OutputCache control
> >
> > <%@ OutputCache Duration="3600" VaryByParam="id" %>
> >
> > assuming "id" is the querystring you want to create a different cache

on.
> >
> > Take a look at:
> > http://samples.gotdotnet.com/quickst...utcaching.aspx
> >
> > Karl
> >
> > --
> >
> > MY ASP.Net tutorials
> > http://www.openmymind.net/
> >
> >
> >
> > "Navin Mishra" <navin.mishra@siemens.com> wrote in message
> > news:uQ6LgmEAGHA.916@TK2MSFTNGP10.phx.gbl...
> > > Hi,
> > >
> > > How could Page level caching be implemented in ASP.NET ? My ASP.NET

> page
> > > takes some query arguments and I want page level cache to last for the
> > > lifetime of the page generated using the passed arguments only. If
> > > different
> > > arguments are passed, I want new page level cache for the new page. Is

> it
> > > as
> > > simple as adding page level variables ? Note page may query data
> > > asynchronously using AJAX also. Does it change things ?
> > >
> > > Thanks and regards
> > >
> > > Navin
> > >
> > >

> >
> >

>
>





All times are GMT. The time now is 04:41 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.