URL Rewriting and Caching

G

Guest

Hi, I am trying to use a URL Rewriting technique outlined here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp
Basically I create a HTTPHandlerFactory that scans whether the URL needs to
be rewritten, and if so, it passes back the Page built from the rewritten url.

I am trying to combine this with OutputCache or some kind of caching. Could
someone recommend me the best way to do this or perhaps what the typical way
to implement URL Rewriting and OutputCache together would be?

I've tried to modify the HttpContext object passed into the GetHandler
method of the IHttpHandlerFactory, but the following lines do not seem to
work:
context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.Cache.SetValidUntilExpires(false);
context.Response.Cache.VaryByParams["ProductID"] = true;


Thanks!
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top