%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 14.207.165.8 / Your IP : 216.73.216.26 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/var/www/html/old/libraries/kunena/cache/ |
Upload File : |
<?php
/**
* Kunena Component
* @package Kunena.Framework
* @subpackage Cache
*
* @copyright (C) 2008 - 2014 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
defined ( '_JEXEC' ) or die ();
/**
* Class KunenaCacheHelper has helper functions to clear all caches that affects Kunena.
*/
abstract class KunenaCacheHelper {
/**
* Clear all cache types. Please avoid using this function except after installation and
* when user wants to do it manually.
*/
public static function clearAll() {
self::clearKunena();
self::clearSystem();
self::clearMenu();
self::clearAccess();
self::clearCacheFiles();
self::clearTemplateFiles();
self::clearStatCache();
self::clearCompiledPHP();
}
/**
* Perform normal cache cleanup.
*/
public static function clear() {
self::clearKunena();
self::clearSystem();
self::clearMenu();
}
/**
* Clear Kunena cache.
*/
public static function clearKunena() {
/** @var JCache|JCacheController $cache */
$cache = JFactory::getCache();
$cache->clean('com_kunena');
}
/**
* Crear Joomla system cache.
*/
public static function clearSystem() {
/** @var JCache|JCacheController $cache */
$cache = JFactory::getCache();
$cache->clean('_system');
}
/**
* Clear Joomla menu cache.
*/
public static function clearMenu() {
KunenaMenuHelper::cleanCache();
}
/**
* Clear Kunena access cache.
*/
public static function clearAccess() {
KunenaAccess::getInstance()->clearCache();
}
/**
* Clear cached files from Kunena.
*/
public static function clearCacheFiles() {
// Delete all cached files.
$cacheDir = JPATH_CACHE.'/kunena';
if (is_dir($cacheDir)) JFolder::delete($cacheDir);
JFolder::create($cacheDir);
}
/**
* Clear cached template files.
*/
public static function clearTemplateFiles() {
// Delete all cached files.
$cacheDir = JPATH_ROOT."/media/kunena/cache";
if (is_dir($cacheDir)) JFolder::delete($cacheDir);
JFolder::create($cacheDir);
}
/**
* Clear PHP statcache (contains file size etc).
*/
public static function clearStatCache() {
clearstatcache();
}
/**
* Clear compiled PHP files, handy during installation when PHP files change.
*/
public static function clearCompiledPHP() {
// Remove all compiled files from APC cache.
if (function_exists('apc_clear_cache')) {
@apc_clear_cache();
}
// Remove all compiled files from XCache.
if (function_exists('xcache_clear_cache')) {
@xcache_clear_cache(XC_TYPE_PHP);
}
}
}