moved cache functionaly into simple functions in model store