Habari\FileCache::_has_group PHP Method

_has_group() protected method

Is group in the cache?
protected _has_group ( $group ) : boolean
return boolean true if item is cached, false if not
    protected function _has_group($group)
    {
        if (!$this->enabled) {
            return false;
        }
        $ghash = $this->get_group_hash($group);
        $valid = true;
        $now = time();
        foreach ($this->cache_files[$ghash] as $hash => $record) {
            if (!file_exists($record['file']) || $record['expires'] <= $now) {
                $valid = false;
                break;
            }
        }
        return isset($this->cache_files[$ghash]) && count($this->cache_files[$ghash]) > 1 && $valid;
    }