Answered by:
Evaluating instead of compiling the IronPython page at every request

Question
-
User-876768081 posted
Hi there,
I am working on a Virtual Path Provider that server IronPython .aspx page as needed.
With VPP, I have the ability to modify the IronPython source code of the ASPX page on the fly. The problem is, I cannot figure out a way to force ASP.Net to check the source everytime it receives a request. So there's always a delay between the source code change in the VPP back end to the "in memory" ASPX page that IIS serves.
Is there any way or setting in the current VPP to allow this behaviour (Always check source - do not cache) in ASP.Net futures?
Saturday, August 18, 2007 1:42 AM
Answers
-
User1641955678 posted
I think you should be able to make that work by implementing GetCacheDependency() on your VPP and returning a CacheDependency that expires right away, or something like that.
David
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, August 18, 2007 5:15 PM
All replies
-
User1641955678 posted
I think you should be able to make that work by implementing GetCacheDependency() on your VPP and returning a CacheDependency that expires right away, or something like that.
David
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, August 18, 2007 5:15 PM -
User-876768081 posted
Dude, you rock. Thank you so much.
1 if (virtualPath.EndsWith(".aspx") | virtualPath.EndsWith(".ascx")) 2 { 3 return new CacheDependency(new string[] { HttpContext.Current.Server.MapPath("/default.aspx") }, new string[] { DateTime.Now.ToString() }, null); 4 } 5 else 6 { 7 return base.GetCacheDependency(virtualPath, virtualPathDependencies, utcStart); 8 }
Tuesday, August 21, 2007 6:18 AM -
User499594133 posted
Hi,
Just read your article - are you able to post what method you override in the Virtual Path Provider implementation. We are trying to work out how to expire page content based on information being modified within a database (ie use a Database dependency)
Thanks
Monday, July 7, 2008 1:47 AM -
Monday, July 7, 2008 1:56 AM