/** * Constructor * * Takes cache directory as param * * @param $cache_dir string */ function __construct($cache_dir = '') { if ($cache_dir) { $this->cache_dir = $cache_dir; } else { $this->cache_dir = OWA_CACHE_DIR; } return parent::__construct(); }
/** * Constructor * * Takes cache directory as param * * @param $cache_dir string */ function __construct() { $servers = owa_coreAPI::getSetting('base', 'memcachedServers'); if (!$servers) { owa_coreAPI::notice('No memcached servers found in configuration settings.'); return; } $persistant = owa_coreAPI::getSetting('base', 'memcachedPersisantConnections'); $error_mode = owa_coreAPI::getSetting('base', 'error_handler'); if ($error_mode === 'development') { $debug = true; } else { $debug = false; } $this->mc = new owa_memcachedClient(array('servers' => $servers, 'debug' => $debug, 'compress_threshold' => 10240, 'persistant' => $persistant)); return parent::__construct(); }