Issue #2473113 by znerol, dpovshed, Wim Leers, Fabianx, dawehner, effulgentsia: All stack middlewares are constructed at the same time even for cached pages