removing the elements from cache after end of window