<commit_before><?php
class Kwf_Assets_Cache extends Kwf_Cache_Core
{
    public function __construct(array $options = array())
    {
        if (!isset($options['lifetime'])) $options['lifetime'] = null;
        if (!isset($options['automatic_serialization'])) $options['automatic_serialization'] = true;
        if (!isset($options['automatic_cleaning_factor'])) $options['automatic_cleaning_factor'] = 0;
        parent::__construct($options);
        $backend = new Zend_Cache_Backend_File(array(
            'cache_dir' => 'cache/assets',
            'cache_file_umask' => 0666,
            'hashed_directory_umask' => 0777,
            'hashed_directory_level' => 2,
        ));
        if (extension_loaded('apc')) {
            $backend = new Kwf_Cache_Backend_TwoLevels(array(
                'slow_backend' => $backend,
                'fast_backend' => new Kwf_Cache_Backend_Apc()
            ));
        }
        $this->setBackend($backend);
    }

    public static function getInstance()
    {
        static $cache;
        if (!isset($cache)) {
            $cache = new self();
        }
        return $cache;
    }
}<commit_msg>disable write_control<commit_after><?php
class Kwf_Assets_Cache extends Kwf_Cache_Core
{
    public function __construct(array $options = array())
    {
        if (!isset($options['lifetime'])) $options['lifetime'] = null;
        if (!isset($options['automatic_serialization'])) $options['automatic_serialization'] = true;
        if (!isset($options['automatic_cleaning_factor'])) $options['automatic_cleaning_factor'] = 0;
        if (!isset($options['write_control'])) $options['write_control'] = false;
        parent::__construct($options);
        $backend = new Zend_Cache_Backend_File(array(
            'cache_dir' => 'cache/assets',
            'cache_file_umask' => 0666,
            'hashed_directory_umask' => 0777,
            'hashed_directory_level' => 2,
        ));
        if (extension_loaded('apc')) {
            $backend = new Kwf_Cache_Backend_TwoLevels(array(
                'slow_backend' => $backend,
                'fast_backend' => new Kwf_Cache_Backend_Apc()
            ));
        }
        $this->setBackend($backend);
    }

    public static function getInstance()
    {
        static $cache;
        if (!isset($cache)) {
            $cache = new self();
        }
        return $cache;
    }
}
{'fraction_non_alphanumeric': 0.13895885810243494, 'fraction_numerical': 0.008396305625524769, 'mean_word_length': 2.540861812778603, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '1834173', 'n_tokens_mistral': 722, 'n_tokens_neox': 686, 'n_words': 121}