<commit_before><?php
class Vps_Util_ClearCache
{
    public function getInstance()
    {
        static $i;
        if (!isset($i)) {
            $c = Vps_Registry::get('config')->clearCacheClass;
            if (!$c) $c = 'Vps_Util_ClearCache';
            $i = new $c();
        }
        return $i;
    }

    public final function getCacheDirs()
    {
        return $this->_getCacheDirs();
    }

    protected function _getCacheDirs()
    {
        $ret = array();
        foreach (new DirectoryIterator('application/cache') as $d) {
            if ($d->isDir() && substr($d->getFilename(), 0, 1) != '.') {
                $ret[] = $d->getFilename();
            }
        }
        if (Vps_Registry::get('config')->server->cacheDirs) {
            foreach (Vps_Registry::get('config')->server->cacheDirs as $d) {
                if (substr($d, -2)=='/*') {
                    foreach (new DirectoryIterator(substr($d, 0, -1)) as $i) {
                        if ($i->isDir() && substr($i->getFilename(), 0, 1) != '.') {
                            $ret[] = substr($d, 0, -1).$i->getFilename();
                        }
                    }
                } else {
                    $ret[] = $d;
                }
            }<commit_msg>searchindex ignorieren<commit_after><?php
class Vps_Util_ClearCache
{
    public function getInstance()
    {
        static $i;
        if (!isset($i)) {
            $c = Vps_Registry::get('config')->clearCacheClass;
            if (!$c) $c = 'Vps_Util_ClearCache';
            $i = new $c();
        }
        return $i;
    }

    public final function getCacheDirs()
    {
        return $this->_getCacheDirs();
    }

    protected function _getCacheDirs()
    {
        $ret = array();
        foreach (new DirectoryIterator('application/cache') as $d) {
            if ($d->isDir() && substr($d->getFilename(), 0, 1) != '.') {
                if ($d->getFilename() == 'searchindex') continue;
                $ret[] = $d->getFilename();
            }
        }
        if (Vps_Registry::get('config')->server->cacheDirs) {
            foreach (Vps_Registry::get('config')->server->cacheDirs as $d) {
                if (substr($d, -2)=='/*') {
                    foreach (new DirectoryIterator(substr($d, 0, -1)) as $i) {
                        if ($i->isDir() && substr($i->getFilename(), 0, 1) != '.') {
                            $ret[] = substr($d, 0, -1).$i->getFilename();
                        }
                    }
                } else {
                    $ret[] = $d;
                }
            }
{'fraction_non_alphanumeric': 0.17306946061311604, 'fraction_numerical': 0.006984866123399301, 'mean_word_length': 1.436672967863894, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '734853', 'n_tokens_mistral': 785, 'n_tokens_neox': 748, 'n_words': 149}