public function purge($name)
    {
        try {
            if ($service = $this->getService($name)) {
                if ($service instanceof CacheInterface) {
                    $service->flush();
                }
            }
        } catch (\Exception $ex) {
            // could be due to purge triggered by ServiceDeleted event
        }
        unset($this->services[$name]);
        \Cache::forget('service_mgr:' . $name);
        \Cache::forget('service_mgr:id_name_map_active');
        \Cache::forget('service_mgr:id_name_map');
        \Cache::forget('service_mgr:name_type_map_active');
        \Cache::forget('service_mgr:name_type_map');
    }