asp.net 2.0 caching

N

Nalaka

Hi,
I have the following requirement for caching a asp.net 2.0 page.

Can some one please tell me if this is possible....
and a some direction would also be wonderful


I have a ASP.net 2.0 page with 1 user control.

1.1 I want the main page to be cached for a day.
1.2 I need the ability to cancel the cache (auto recreate) programatically.
Basically undert certain situations, I should be able to get the page
regenerated during the day.
2. I want the embeded usercontrol to be refreshed every minute.


Thanks in advance
Nalaka
 
S

Steven Cheng[MSFT]

Hi Nalaka,

Welcome.
For the page caching questions you mentioned, here are some of my
understanding and suggestion:

For ASP.NET page's output cache, it is caching the entire page output so we
can not cache page ,but make one of the contained usercontrol not cached...


And for programmatically invalid page's output cache, so far we I can get
is the following options:

1. Using custom cache vary to specify cache dependency

2. Use the HttpCachePolicy's AddCallback Handler for page cache
valication....

Here are some related reference article mentioned these means:

#ASP.NET's Cache Bonus
http://www.softsteel.co.uk/tutorials/AspNetCaching/

#HttpCachePolicy.AddValidationCallback Method
http://msdn2.microsoft.com/en-us/library/system.web.httpcachepolicy.addvalid
ationcallback.aspx

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Nalaka" <[email protected]>
| Subject: asp.net 2.0 caching
| Date: Thu, 5 Jan 2006 15:43:07 -0800
| Lines: 21
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: m181-9.bctransit.bc.ca 199.60.181.9
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:368927
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi,
| I have the following requirement for caching a asp.net 2.0 page.
|
| Can some one please tell me if this is possible....
| and a some direction would also be wonderful
|
|
| I have a ASP.net 2.0 page with 1 user control.
|
| 1.1 I want the main page to be cached for a day.
| 1.2 I need the ability to cancel the cache (auto recreate)
programatically.
| Basically undert certain situations, I should be able to get the
page
| regenerated during the day.
| 2. I want the embeded usercontrol to be refreshed every minute.
|
|
| Thanks in advance
| Nalaka
|
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Leverage browser caching 2
caching problem ASP.NET 2.0 0
Caching .. 4
Resource Files and Output Caching 2
Caching web pages. 2
Measuring Cache object sizes in ASP.NET 2.0 2
ASP.NET Caching 10
Caching Master File 0

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top