public function clean($maxlifetime, $next)
    {
        $this->cache = array_filter($this->cache, function($item) use ($maxlifetime) {
            /** @var MemoryItem $item */
            return $item->is_valid($maxlifetime);
        });

        return $next($maxlifetime);
    }