modified cache calcuration