* add clear_cache.php bin command

This commit is contained in:
slawkens
2019-04-23 23:50:54 +02:00
parent 601d2808a2
commit 7b1989cef2
3 changed files with 70 additions and 52 deletions

View File

@@ -0,0 +1,18 @@
<?php
if(PHP_SAPI !== 'cli') {
die('This script can be run only in command line mode.');
}
require_once __DIR__ . '/../../common.php';
require_once SYSTEM . 'functions.php';
require_once SYSTEM . 'init.php';
if(clearCache()) {
echo 'Cache cleared.';
}
else {
echo 'Unexpected error.';
}
echo PHP_EOL;