return cached if subtree==='retain'