added stack to tree cache keys