public function removeExpired() { foreach ($this->list as $name => $entry) { if ($entry->hasExpired()) { unset($this->list[$name]); } } }