This will reduce the work by going to performance settings page (admin/settings/performance) & clicking "cleared cached data" by scrolling down
But make sure that this page is only accessed by administrator
For Drupal 7 is same as Drupal 6
<?php drupal_flush_all_caches(); drupal_set_message('cache flushed.');?>
This will reduce the work by going to performance settings page (admin/settings/performance) & clicking "cleared cached data" by scrolling down