primaryTasks.remove (task); frozenTasks.remove (task); frozenCacheValid = false;
if (task != null) { primaryTasks.remove (task); frozenTasks.remove (task); frozenCacheValid = false; }
  public void removeTask (String key) {    Task task = getTask (key);    tasks.remove (key);    primaryTasks.remove (task);    frozenTasks.remove (task);    frozenCacheValid = false;  }