Can I use orchard.warmup make website static?

Topics: Administration
Feb 8, 2015 at 2:48 AM
Hi,Can I use orchard.warmup make website static?
Now,I use orchard.warmup make up all of pages,but,I found that,when I visit any page of static pages,it still read data from database,my problem is that can it do not read data from db?
Feb 9, 2015 at 12:59 PM
I don't think you can do that without tweaking some code.
What you could maybe do is implement OWIN middleware that is similar to the output cache filter, but instead of using the cache, you would use the system's disk to store the generated HTML. Not sure how that's better than serving HTML from memory however. Instead, I'd probably try and re-implement the output cache filter into a middleware component and have it execute before the Orchard middleware is executed.
Feb 10, 2015 at 12:16 AM
Hi,I had done that!
But I haven't implement OWIN middleware, that I Adjust the code of method 'BeginBeginRequest' in class Orchard.WarmupStarter.WarmupHttpModule, The specific operation is :
The original code is
if (!InWarmup() || WarmupUtility.DoBeginRequest(_context))
the result of my adjust is:
if (  WarmupUtility.DoBeginRequest(_context)||!InWarmup())
I didn't know is there any adverse effects,but it can works well.

and I had implement some task which use jobsqueue to create static pages, now the page are all opened in 1s except the pases pageNum>=2