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.
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