original_string: 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');
      }
code: 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');
      }
code_tokens: 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' ) ; }
docstring: Disconnect from the given service and remove from local cache.
  
  @param  string $name
  
  @return void
docstring_tokens: Disconnect from the given service and remove from local cache .