ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
flush-definition-cache.php
Go to the documentation of this file.
1#!/usr/bin/php
2<?php
3
4chdir(dirname(__FILE__));
5require_once 'common.php';
7
19echo "Flushing cache... \n";
20
21require_once(dirname(__FILE__) . '/../library/HTMLPurifier.auto.php');
22
24
25$names = array('HTML', 'CSS', 'URI', 'Test');
26if (isset($argv[1])) {
27 if (in_array($argv[1], $names)) {
28 $names = array($argv[1]);
29 } else {
30 throw new Exception("Cache parameter {$argv[1]} is not a valid cache");
31 }
32}
33
34foreach ($names as $name) {
35 echo " - Flushing $name\n";
37 $cache->flush($config);
38}
39
40echo "Cache flushed successfully.\n";
41
42// vim: et sw=4 sts=4
An exception for terminatinating execution or to throw for unit testing.
static createDefault()
Convenience constructor that creates a default configuration object.
Definition: Config.php:154
assertCli()
Definition: common.php:3
$argv