Add Cache_Remove(int segIndex) function since it is necessary for cleaning.