/**
  * (Hook-function called from TypoScriptFrontend, see ext_localconf.php for configuration)
  *
  * @param array $parameters Parameters delivered by TypoScriptFrontend
  * @param TypoScriptFrontendController $pObj The calling parent object (TypoScriptFrontend)
  *
  * @returnvoid
  */
 public function clearStaticFile(array $parameters, TypoScriptFrontendController $pObj)
 {
     if (ExtensionManagementUtility::isLoaded('crawler') && $pObj->applicationData['tx_crawler']['running'] && in_array('tx_ncstaticfilecache_clearstaticfile', $pObj->applicationData['tx_crawler']['parameters']['procInstructions'])) {
         $pageId = $GLOBALS['TSFE']->id;
         if (is_numeric($pageId)) {
             CacheUtility::clearByPageId($pageId);
             $pObj->applicationData['tx_crawler']['log'][] = 'EXT:nc_staticfilecache cleared static file';
         } else {
             $pObj->applicationData['tx_crawler']['log'][] = 'EXT:nc_staticfilecache skipped';
         }
     }
 }
 /**
  * Constructs this object.
  */
 public function __construct()
 {
     $this->cache = CacheUtility::getCache();
     $this->signalDispatcher = GeneralUtility::makeInstance(Dispatcher::class);
     $this->configuration = GeneralUtility::makeInstance(Configuration::class);
 }
 /**
  * Remove the expired pages
  */
 public function removeExpiredPagesCommand()
 {
     CacheUtility::getCache()->collectGarbage();
 }
 /**
  * Handles incoming actions (e.g. removing all expired pages).
  *
  * @return    void
  */
 protected function handleActions()
 {
     $action = GeneralUtility::_GP('ACTION');
     if (isset($action['removeExpiredPages']) && (bool) $action['removeExpiredPages']) {
         CacheUtility::getCache()->collectGarbage();
     }
 }