<commit_before><?php
/**
 * 
 * @author Deviate Ltd 2014-2015 http://www.deviate.net.nz
 * @package silverstripe-cachable
 * 
 * Configure the module's storage:
 * 
 * The default is to use memcached for the cache store, but this can be overriden in 
 * project YML config. You can also optionally override the default "server" array 
 * normally passed to {@link SS_Cache} and {@link Zend_Cache}. See the README.
 */

// On CWP setups, allow the module as much RAM as it can offer
// See: https://www.cwp.govt.nz/guides/technical-faq/php-configuration/
if(!defined(CWP_ENVIRONMENT)) {
    ini_set('memory_limit', '256M');
}

define('CACHEABLE_STORE_DIR', TEMP_FOLDER . DIRECTORY_SEPARATOR . 'cacheable');
define('CACHEABLE_STORE_DIR_TEST', TEMP_FOLDER . DIRECTORY_SEPARATOR . 'cacheable_tests');
define('CACHEABLE_STORE_NAME', 'cacheablestore');
define('CACHEABLE_STORE_FOR', 'Cacheable');
define('CACHEABLE_STORE_TAG_DEFAULT', 'cacheable_tag_nav'); // Default Zend tag name for this cache 
define('CACHEABLE_STORE_TAG_DEFAULT_TEST', 'cacheable_tag_nav_test');
define('CACHEABLE_STORE_WEIGHT', 1000);

CacheableConfig::configure();
SS_Cache::pick_backend(CACHEABLE_STORE_NAME, CACHEABLE_STORE_FOR, CACHEABLE_STORE_WEIGHT);<commit_msg>FIX: Silly bug to check if constant exists.<commit_after><?php
/**
 * 
 * @author Deviate Ltd 2014-2015 http://www.deviate.net.nz
 * @package silverstripe-cachable
 * 
 * Configure the module's storage:
 * 
 * The default is to use memcached for the cache store, but this can be overriden in 
 * project YML config. You can also optionally override the default "server" array 
 * normally passed to {@link SS_Cache} and {@link Zend_Cache}. See the README.
 */

// On CWP setups, allow the module as much RAM as it can offer
// See: https://www.cwp.govt.nz/guides/technical-faq/php-configuration/
if(defined(CWP_ENVIRONMENT)) {
    ini_set('memory_limit', '256M');
}

define('CACHEABLE_STORE_DIR', TEMP_FOLDER . DIRECTORY_SEPARATOR . 'cacheable');
define('CACHEABLE_STORE_DIR_TEST', TEMP_FOLDER . DIRECTORY_SEPARATOR . 'cacheable_tests');
define('CACHEABLE_STORE_NAME', 'cacheablestore');
define('CACHEABLE_STORE_FOR', 'Cacheable');
define('CACHEABLE_STORE_TAG_DEFAULT', 'cacheable_tag_nav'); // Default Zend tag name for this cache 
define('CACHEABLE_STORE_TAG_DEFAULT_TEST', 'cacheable_tag_nav_test');
define('CACHEABLE_STORE_WEIGHT', 1000);

CacheableConfig::configure();
SS_Cache::pick_backend(CACHEABLE_STORE_NAME, CACHEABLE_STORE_FOR, CACHEABLE_STORE_WEIGHT);
{'fraction_non_alphanumeric': 0.11884753901560624, 'fraction_numerical': 0.012004801920768308, 'mean_word_length': 6.042253521126761, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '1715086', 'n_tokens_mistral': 880, 'n_tokens_neox': 825, 'n_words': 202}