/** Called when a new page of caches was loaded. */
  public void reFilter() {
    if (currentFilter != null) {
      // Back up the list again
      originalList = new ArrayList<cgCache>(list);

      currentFilter.filter(list);
    }
  }
  /** Called after a user action on the filter menu. */
  public void setFilter(final IFilter filter) {
    // Backup current caches list if it isn't backed up yet
    if (originalList == null) {
      originalList = new ArrayList<cgCache>(list);
    }

    // If there is already a filter in place, this is a request to change or clear the filter, so we
    // have to
    // replace the original cache list
    if (currentFilter != null) {
      list.clear();
      list.addAll(originalList);
    }

    // Do the filtering or clear it
    if (filter != null) {
      filter.filter(list);
    }
    currentFilter = filter;

    notifyDataSetChanged();
  }