Source for file garbagecron.php

Documentation is available at garbagecron.php

  1. <?php
  2. /**
  3.  * @package    Joomla.Cli
  4.  *
  5.  * @copyright  Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  6.  * @license    GNU General Public License version 2 or later; see LICENSE.txt
  7.  */
  8.  
  9. // Initialize Joomla framework
  10. const _JEXEC 1;
  11.  
  12. // Load system defines
  13. if (file_exists(dirname(__DIR__'/defines.php'))
  14. {
  15.     require_once dirname(__DIR__'/defines.php';
  16. }
  17.  
  18. if (!defined('_JDEFINES'))
  19. {
  20.     define('JPATH_BASE'dirname(__DIR__));
  21.     require_once JPATH_BASE '/includes/defines.php';
  22. }
  23.  
  24. // Get the framework.
  25. require_once JPATH_LIBRARIES '/import.legacy.php';
  26.  
  27. // Bootstrap the CMS libraries.
  28. require_once JPATH_LIBRARIES '/cms.php';
  29.  
  30. /**
  31.  * Cron job to trash expired cache data
  32.  *
  33.  * @package  Joomla.CLI
  34.  * @since    2.5
  35.  */
  36. class GarbageCron extends JApplicationCli
  37. {
  38.     /**
  39.      * Entry point for the script
  40.      *
  41.      * @return  void 
  42.      *
  43.      * @since   2.5
  44.      */
  45.     public function doExecute()
  46.     {
  47.         $cache JFactory::getCache();
  48.         $cache->gc();
  49.     }
  50. }
  51.  
  52. JApplicationCli::getInstance('GarbageCron')->execute();

Documentation generated on Tue, 19 Nov 2013 15:03:58 +0100 by phpDocumentor 1.4.3