How to clear cache externally? I'd like some help how to clear the cache using an external script. I have a script that adds nodes each night, and I'd also like it to clear the views cache so - without having to make out by myself the MySQL query.
If you are running a script, you'll likely benefit from using Drush.  With the Drush php-eval and php-script commands, you can easily call a snippet of php code (such as the examples shown in other answers to this question) after bootstrapping Drupal.  Without Drush, you would have to set up a web service and use wget or curl to run your code, or try to call the Drupal bootstrap code yourself.  Better yet, Drush even comes with a built-in command to clear the cache, so you don't need to worry about writing any php code at all, if that's all you want to do from your script.  Just use:

cd /path/to/drupal/sites/default &amp;&amp; drush cache-clear all


You may also wish to learn about site aliases; if you define an alias called @site, then you can instead use:

drush @site cache-clear all