commented cache code for stock count calculation