CoreFiles by mySites.guru
garbagecron.php55 lines, 1,069 bytes, from Joomla_3.8.13-Stable-Full_Package.zip
Raw History Compare with 3.8.12
md5
e6b35a3185842e2338cc0a9258f5e055
sha1
9c141dc4b7e28e64d0b9331e046ecdf3187472de
sha256
dc76188162e4dd14f0efe38595f2d17b66192e53471bb61b17ec881baedc0287
<?php
/**
 * @package    Joomla.Cli
 *
 * @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

/**
 * A command line cron job to trash expired cache data.
 */

// Initialize Joomla framework
const _JEXEC = 1;

// Load system defines
if (file_exists(dirname(__DIR__) . '/defines.php'))
{
	require_once dirname(__DIR__) . '/defines.php';
}

if (!defined('_JDEFINES'))
{
	define('JPATH_BASE', dirname(__DIR__));
	require_once JPATH_BASE . '/includes/defines.php';
}

// Get the framework.
require_once JPATH_LIBRARIES . '/import.legacy.php';

// Bootstrap the CMS libraries.
require_once JPATH_LIBRARIES . '/cms.php';

/**
 * Cron job to trash expired cache data.
 *
 * @since  2.5
 */
class GarbageCron extends JApplicationCli
{
	/**
	 * Entry point for the script
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	public function doExecute()
	{
		$cache = JFactory::getCache();
		$cache->gc();
	}
}

JApplicationCli::getInstance('GarbageCron')->execute();

The same content is in 29 releases, Joomla 3.8.4-rc to 3.9.1. See them all, or every version of this file.