Improve template caching to prevent "downtime"

Chris H.

Member
Whenever we make template changes or add add-ons, it takes a few minutes for the caching to complete. In part this is, I'm sure, due to unique styles for several forums adding to the compile time. So we're looking into improvements there. It's unfortunate that while the templates are rebuilding our site is essentially "down" by returning a blank page. What I'd propose doing is allowing the system to keep utilizing the old templates while the new compiles are created.

One possible approach might be to add an "is_active" boolean to the compiled templates table. All active templates are active. When templates have to be compiled and re-cached insert them with is_active = false. Once the time consuming process of compiling is complete, you just run an update to flip is_active and then delete the old compiles.

Maybe not as simple as I make it sound, as I haven't really dug into the template compile code, but if it'd be really nice to reduce this perceived downtime.
 
Upvote 1
Although I believe this has been mentioned before I would love to see this. I think K or M mentioned somewhere that they were considering it...don't take my word for it though.
 
I think I would prefer they didn't spend time on this. This is an issue that occurs less often than really matters, and their time is spent better elsewhere.
 
I think I would prefer they didn't spend time on this. This is an issue that occurs less often than really matters, and their time is spent better elsewhere.

To be fair, the purists that they are will ensure it gets addressed. Whilst I am not agreeing with you entirely, as I would love to see it resolved at some point (just not this year) I suspect it is on the todo list right near the bottom where it should stay :)
 
Top Bottom