routing.yml file doesn't work I'm working on an existing Drupal 8 site. I'm changing anything in routing.yml.

In a routing.yml file I have the following.

user_profile_update.callback:
  path: '/user-update'
  defaults:
    _controller: '\Drupal\user_profile\Controller\ProfileUpdateController::updateUser'
  requirements:
    _user_is_logged_in: 'TRUE'
    _permission: 'access content'


I want to change the controller's method to 
\Drupal\user_profile\Controller\ProfileUpdateController::updateUser123(), but after editing the route definition, the ProfileUpdateController class is still using the updateUser() method.

I removed all the cache tables from the database with the following SQL, but the controller is still not using the updateUser123() method.

TRUNCATE cache_config;
TRUNCATE cache_container;
TRUNCATE cache_data;
TRUNCATE cache_default;
TRUNCATE cache_discovery;
TRUNCATE cache_dynamic_page_cache;
TRUNCATE cache_entity;
TRUNCATE cache_menu;
TRUNCATE cache_render;
TRUNCATE cache_toolbar;


How can I fix the issue?
You're saying that you have this in your routing.yml file:

user_profile_update.callback:
  path: '/user-update'
  defaults:
    _controller: '\Drupal\user_profile\Controller\ProfileUpdateController::updateUser'
  requirements:
    _user_is_logged_in: 'TRUE'
    _permission: 'access content'


You're still calling updateUser and not updateUser123

Your controller should be looking like this:

class ProfileUpdateController extends ControllerBase {

  public function updateUser123() {
  //your code here
  }

}


And now you'll need to call the method:

user_profile_update.callback:
  path: '/user-update'
  defaults:
    _controller: '\Drupal\user_profile\Controller\ProfileUpdateController::updateUser123'
  requirements:
    _user_is_logged_in: 'TRUE'
    _permission: 'access content'


Also I recommend clearing your cache with Drush.
This will empty all caches and rebuild the data required for Drupal to execute the page request