using System.CodeDom.Compiler;
using System.IO;
using System.Text;
+using System.Web.Caching;
using System.Web.UI;
using System.Web.Util;
public Type GetCompiledType ()
{
+ Type type = (Type) HttpRuntime.Cache.Get (tparser.InputFile);
+ if (type != null) {
+ return type;
+ }
+
InitParser (Path.GetFullPath (tparser.InputFile));
DoParse ();
#if DEBUG
BaseCompiler compiler = GetCompilerFromType ();
- return compiler.GetCompiledType ();
+ type = compiler.GetCompiledType ();
+ CacheDependency cd = new CacheDependency ((string[])
+ tparser.Dependencies.ToArray (typeof (string)));
+
+ HttpRuntime.Cache.Insert (tparser.InputFile, type, cd);
+ return type;
}
#if DEBUG
+2004-01-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * AspGenerator.cs: use the Cache to store compiled Types. Don't parse
+ pages more than once. Thanks to Eric Lindvall for pointing this out.
+
2004-01-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* TemplateControlCompiler.cs: allow handling subproperties for other