Purge cache file rocksolid_custom_elements_config.php

@return void
975406
public static function purgeCache()
	{
		$filePaths = static::getCacheFilePaths();

		if (file_exists($filePaths['fullPath'])) {
			$file = new \File($filePaths['path'], true);
			$file->write('');
			$file->close();
			static::refreshOpcodeCache($filePaths['fullPath']);
		}
	}
1374015
function clear()
    {
        $index['index'] = $this->config->index;
        $index['type'] = $this->config->type;
        $index['body']['query']['bool']['must']= [
            ['match_phrase'=>[ '__meta.sid'=>$this->sid, ]]
        ];
        $this->client->deleteByQuery($index);
    }
733565
public function PurgeCache() {
    foreach (glob($this->CacheDir .'/CURL_*') as $filename) {
      $seconds = $this->MaxAge($filename);
      if (file_exists($filename) && @filemtime($filename) < (time() - $seconds)) {
        @unlink($filename);
      }
    }
  }
893418
public function clear()
    {
        $this->id = null;
        $this->remote_app_id = null;
        $this->apiversion = null;
        $this->name = null;
        $this->version = null;
        $this->config_displayerrors = null;
        $this->config_bypasscache = null;
        $this->config_minifymarkup = null;
        $this->config_debugmode = null;
        $this->config_maintenancemode = null;
        $this->config_gzipscripts = null;
        $this->config_rewriteurl = null;
        $this->config_adminemail = null;
        $this->config_cachemode = null;
        $this->statuscode = null;
        $this->extensions = null;
        $this->extensions_unserialized = null;
        $this->log = null;
        $this->log_unserialized = null;
        $this->php = null;
        $this->php_unserialized = null;
        $this->mysql = null;
        $this->mysql_unserialized = null;
        $this->alreadyInSave = false;
        $this->alreadyInValidation = false;
        $this->alreadyInClearAllReferencesDeep = false;
        $this->clearAllReferences();
        $this->applyDefaultValues();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
68734
private function cleanUp()
    {
        if ($this->quiet) {
            $errors = explode(PHP_EOL, ob_get_clean());
            $shown = [];

            foreach ($errors as $error) {
                if ($error && !in_array($error, $shown)) {
                    out($error, 'error');
                    $shown[] = $error;
                }
            }
        }

        if (file_exists($this->tmpPharPath)) {
            @unlink($this->tmpPharPath);
        }
        if (file_exists($this->tmpPubkeyPath)) {
            @unlink($this->tmpPharPath);
        }
    }
271132
public function clearCache()
  {
    $files = glob($this->cachePath);
    foreach($files as $file) {
      if (is_file($file)) {
        unlink($file);
      }
    }
  }
979403
public function clear()
    {
        $finder = new Finder();

        /** @var \Symfony\Component\Finder\SplFileInfo $file */
        foreach ($finder->files()->in($this->cacheDir)->depth(0)->name(self::CACHE_PATH_REGEX) as $file) {
            @unlink($file->getRealPath());
        }
    }
135858
protected function flushOldCache()
    {
        do_action("before_theme_flush_old_cache");

        $files = glob($this->cachePath . "*");
        $files = (is_array($files) && $files ? $files : array());

        $cache_config = $this->getConfig("cache");

        foreach ($files as $file):
            if (file_exists($file) && (time() - filemtime($file) > $cache_config["lifetime"])):
                unlink($file);
            endif;
        endforeach;

        do_action("after_ntl_flush_old_cache");
    }
435800
public function cleanUpGarbage()
    {
        $cacheFilesExpire = time() - $this->getCacheLifetime() * 3600 * 24;

        // relies on templates sorting order being related to their modification dates
        $upperLimit = $this->getPhpCodeDestination() . $this->getFunctionNamePrefix($cacheFilesExpire) . '_';
        $lowerLimit = $this->getPhpCodeDestination() . $this->getFunctionNamePrefix(0);

        // second * gets phptal:cache
        $cacheFiles = glob($this->getPhpCodeDestination() . 'tpl_????????_*.' . $this->getPhpCodeExtension() . '*');

        if ($cacheFiles) {
            foreach ($cacheFiles as $index => $file) {

                // comparison here skips filenames that are certainly too new
                if (strcmp($file, $upperLimit) <= 0 || substr($file, 0, strlen($lowerLimit)) === $lowerLimit) {
                    $time = filemtime($file);
                    if ($time && $time < $cacheFilesExpire) {
                        @unlink($file);
                    }
                }
            }
        }
    }
294923
public function clear()
    {
        $now = Carbon::now('UTC');

        if ($handle = opendir(SettingsFile::TEMP_FOLDER)) {
            while (false !== ($file = readdir($handle))) {
                if ($file !== '.' && $file !== '..') {
                    $file_path = SettingsFile::TEMP_FOLDER . $file;
                    $file_time = filemtime($file_path);
                    $file_date = Carbon::createFromTimestamp($file_time, 'UTC');

                    if ($file_date->diffInDays($now) >= SettingsFile::OUTDATED_FILE_DAYS) {
                        @unlink($file_path);
                    }
                }
            }

            closedir($handle);
        }
    }
1291753
def _purge_config_file(self, key):
        
        state = self.__load_state()
        del state['remove_configs'][key]
        self.__dump_state(state)
1354239
protected function _delete_all_cache() {
		$sidebars_widgets = wp_get_sidebars_widgets();
		$sidebars = array_keys( $sidebars_widgets );

		foreach ( $sidebars as $sidebar_id ) {
			if ( ! static::_is_caching_sidebar( $sidebar_id ) ) {
				continue;
			}

			delete_transient( static::get_transient_id( $sidebar_id ) );
		}
	}
214304
public function clearCacheFiles()
    {
        if (false === $this->cache) {
            return;
        }

        foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->cache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
            if ($file->isFile()) {
                @unlink($file->getPathname());
            }
        }
    }
99594
public function clearCacheAction()
    {
        /* @var $cache FlushableCache */
        $cache = $this->serviceLocator->get('DiCache');

        if ($cache instanceof FlushableCache) {
            $cache->flushAll();
        }

        echo "PHP DI definitions cache was cleared." . PHP_EOL . PHP_EOL;
    }
802887
public function flush()
    {
        $keys = $this->getCacheKeys();
        foreach ($keys as $key) {
            Cache::forget($this->makeCacheKey($key));
        }
        $this->removeKeys($keys);
    }
939354
protected function clearCaches() {
    $config = $this->getConfiguration();
    foreach($config->getSections() as $section) {
      $sectionValues = $config->getSection($section, true);
      if (isset($sectionValues['__class'])) {
        $instance = ObjectFactory::getInstance($section);
        if ($instance instanceof Cache) {
          $instance->clearAll();
        }
        elseif ($instance instanceof View) {
          $instance->clearCache();
        }
      }
    }
  }
432647
public function clearAll()
    {
        /**
         * @var Settings settings
         */
        $settings = FastcgiCacheBust::$plugin->getSettings();
        if (!empty($settings) && !empty($settings->cachePath)) {
            $cacheDirs = explode(',', $settings->cachePath);
            foreach ($cacheDirs as $cacheDir) {
                $cacheDir = trim($cacheDir);
                try {
                    FileHelper::clearDirectory($cacheDir);
                } catch (ErrorException $e) {
                    Craft::error($e->getMessage(), __METHOD__);
                }
                Craft::info(
                    Craft::t(
                        'fastcgi-cache-bust',
                        'FastCGI Cache busted: `'.$cacheDir
                    ),
                    __METHOD__
                );
            }
        }
    }