<commit_before><?php

namespace Auryn;

class ReflectionCacheApc implements ReflectionCache {
    private $localCache;
    private $timeToLive = 5;

    public function __construct(ReflectionCache $localCache = NULL) {
        $this->localCache = $localCache ?: new ReflectionCacheArray;
    }

    public function setTimeToLive($seconds) {
        $seconds = (int) $seconds;
        $this->timeToLive = ($seconds > 0) ? $seconds : $this->timeToLive;

        return $this;
    }

    private function fetch($key) {
        $localData = $this->localCache->fetch($key);

        if ($localData != FALSE) {
            return $localData;
        } else {
            return apc_exists($key) ? apc_fetch($key) : FALSE;<commit_msg>remove obsolete call to apc_exists()<commit_after><?php

namespace Auryn;

class ReflectionCacheApc implements ReflectionCache {
    private $localCache;
    private $timeToLive = 5;

    public function __construct(ReflectionCache $localCache = NULL) {
        $this->localCache = $localCache ?: new ReflectionCacheArray;
    }

    public function setTimeToLive($seconds) {
        $seconds = (int) $seconds;
        $this->timeToLive = ($seconds > 0) ? $seconds : $this->timeToLive;

        return $this;
    }

    private function fetch($key) {
        $localData = $this->localCache->fetch($key);

        if ($localData != FALSE) {
            return $localData;
        } else {
            $data = apc_fetch($key, $success)
            return $success ? $data : FALSE;
{'fraction_non_alphanumeric': 0.12026578073089701, 'fraction_numerical': 0.0026578073089701, 'mean_word_length': 2.7556109725685785, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '4302132', 'n_tokens_mistral': 445, 'n_tokens_neox': 430, 'n_words': 104}