CoreFiles by mySites.guru
garbagecron.php55 lines, 1,069 bytes, from Joomla_3.9.13-Stable-Full_Package.zip
Raw History Compare with 3.9.12
md5
7c15f01bdb8d4c398bd1d30161e31f2f
sha1
7803415a2349f09f167ff79b11cff14118dd07c5
sha256
854d419676bfd39eea44a2375a87d6e74fbd869ba3bcd014f1217be4d7675721
<?php
/**
 * @package    Joomla.Cli
 *
 * @copyright  Copyright (C) 2005 - 2019 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 26 releases, Joomla 3.9.2-rc to 3.9.14. See them all, or every version of this file.