cache algorithm modified