lp: rework stack cache