<commit_before><?php
/**
 * Copyright (c) 2012 <NAME> <<EMAIL>>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */

namespace OC\Memcache;

class APCu extends APC {
	public function clear($prefix = '') {
		$ns = $this->getNamespace() . $prefix;
		$ns = preg_quote($ns, '/');
		$iter = new \APCIterator('/^'.$ns.'/');
		return apc_delete($iter);
	}

	static public function isAvailable() {
		if (!extension_loaded('apcu')) {
			return false;
		} elseif (!ini_get('apc.enable_cli') && \OC::$CLI) {
			return false;
		} else {
			return true;
		}
	}<commit_msg>Fix APCIterator syntax in \OC\Memcache\APCU::clear<commit_after><?php
/**
 * Copyright (c) 2012 <NAME> <<EMAIL>>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */

namespace OC\Memcache;

class APCu extends APC {
	public function clear($prefix = '') {
		$ns = $this->getNamespace() . $prefix;
		$ns = preg_quote($ns, '/');
		$iter = new \APCIterator('user', '/^'.$ns.'/');
		return apc_delete($iter);
	}

	static public function isAvailable() {
		if (!extension_loaded('apcu')) {
			return false;
		} elseif (!ini_get('apc.enable_cli') && \OC::$CLI) {
			return false;
		} else {
			return true;
		}
	}
{'fraction_non_alphanumeric': 0.17444529456771232, 'fraction_numerical': 0.0076511094108645756, 'mean_word_length': 3.6548042704626336, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '790921', 'n_tokens_mistral': 493, 'n_tokens_neox': 454, 'n_words': 123}