Only flush from terminal/command prompt?

Is there a command to do a flush without a dev/build?

Well, YOUR_URL?flush=1 ? :slight_smile:

1 Like

Thanks, I meant from the terminal. I used several commands but there not working.
Ex:
php vendor/silverstripe/framework/cli-script.php / flush=1
php vendor/silverstripe/framework/cli-script.php /?flush=1
not working

It should be working, but Silverstripe CMS keeps different caches based on the user. If you are expecting to see your website flush, it will not… unless your CLI user is the same one that runs the website (usually the webserver, e.g. www-data, httpd, etc.)

This is by design to prevent e.g. a cron task or queued job from bringing down the website via unintended flushing, or such.

My take is to clear all sub-directories of the silverstripe-cache folder, so the cache of the web-user is also to be cleared:

rm -rf /data/www/public_html/silverstripe-cache/*