Hi I am using below code. to convert the template. I have around 100 templates and wan to cache them. it works absolutely fine on my Dev but does not work on production. For the same cacheSring I takes alomost 6000 ms to load the template and parse it. Any help would greatly appreciate.
Hi I am using below code. to convert the template. I have around 100 templates and wan to cache them. it works absolutely fine on my Dev but does not work on production. For the same cacheSring I takes alomost 6000 ms to load the template and parse it. Any help would greatly appreciate.
Stopwatch sw = new Stopwatch(); sw.Start(); if (templateTypeId > -1) { string cacheString = templateTypeId.ToString(); Audit.Logging.Log("Cache hit!! Template : "+templateTypeId + ". Method is " + MethodBase.GetCurrentMethod().Name,null,"Dep Log"); document = RazorEngine.Razor.Parse(template, model, cacheString); } else { Audit.Logging.Log("No Cache hit!! Template : " + templateTypeId + ". Method is " + MethodBase.GetCurrentMethod().Name, null, "Dep Log"); document = Razor.Parse(template, model); } sw.Stop();