clear_cache.php

This commit is contained in:
yuri
2015-04-14 12:11:45 +03:00
parent 2b8a8d23eb
commit e7b033304c
3 changed files with 40 additions and 0 deletions

View File

@@ -155,6 +155,7 @@ module.exports = function (grunt) {
'bootstrap.php',
'cron.php',
'rebuild.php',
'clear_cache.php',
'upgrade.php',
'index.php',
'LICENSE.txt',

View File

@@ -138,6 +138,12 @@ class Application
$dataManager->rebuild();
}
public function runClearCache()
{
$dataManager = $this->getContainer()->get('dataManager');
$dataManager->clearCache();
}
public function isInstalled()
{
$config = $this->getContainer()->get('config');

33
clear_cache.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
$sapiName = php_sapi_name();
if (substr($sapiName, 0, 3) != 'cli') {
die("Rebuild can be run only via CLI");
}
include "bootstrap.php";
$app = new \Espo\Core\Application();
$app->runClearCache();