Start the cache

@param string $id cache id
@param string $group name of the cache group
@param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested
@return boolean true if the cache is hit (false else)
@access public
430163
function start($id, $group = 'default', $doNotTestCacheValidity = false)
    {
        $data = $this->get($id, $group, $doNotTestCacheValidity);
        if ($data !== false) {
            echo($data);
            return true;
        }
        ob_start();
        ob_implicit_flush(false);
        return false;
    }
1066407
public static function validate($instance, $group = "") {
		$class = get_class ( $instance );
		$cache = self::getClassCacheValidators ( $class, $group );
		if ($cache !== false) {
			return self::validateFromCache_ ( $instance, $cache );
		}
		$members = self::fetch ( $class );
		if ($group !== "") {
			$members = self::getGroupArrayValidators ( $members, $group );
		}
		return self::validate_ ( $instance, $members );
	}
1166213
function recursive_groups($group, $cache_only = FALSE) {
        $this->_debug_message = "";
        $this->_warning_message = "";
        if ($group==NULL){ return (false); }

        $ret_groups=array();
        $ret_data = FALSE;

/*
    echo "DEBUG GROUP is group $group in cache ?\n";
    print_r($this->_cache_recursive_groups);
*/

        clearstatcache();
        
		if ($this->_cache_support) {
            if ("" != $this->get_cache_folder()) {
                if (file_exists($this->get_cache_folder()."ldap_rgroup_".md5($group).".cache")) {
                    if ((filemtime($this->get_cache_folder()."ldap_rgroup_".md5($group).".cache") + $this->get_cache_timeout()) > time()) {
                        if ($cache_handle = fopen($this->get_cache_folder()."ldap_rgroup_".md5($group).".cache", "rb")) {
                            $ret_groups = unserialize(fgets($cache_handle));
                            $ret_data = TRUE;
                            fclose($cache_handle);
                            @touch($this->get_cache_folder()."ldap_rgroup_".md5($group).".cache");
                        }
                    }
                }
            } elseif (isset($this->_cache_recursive_groups[$group])) {
                $ret_groups = $this->_cache_recursive_groups[$group];
                $ret_data = TRUE;
            }
        }

    	if (!$ret_data) {
            if (!$cache_only) {
    			$groups=$this->group_info($group,array($this->_group_attribute));
    			
    			// Additional test by SysCo/al
    			if (isset($groups[0][$this->_group_attribute]))
    			{
    				$groups=$groups[0][$this->_group_attribute];

    				if ($groups){
    					$group_names=$this->nice_names($groups);

    					$ret_groups=array_merge($ret_groups,$group_names); //final groups to return
    					
    					foreach ($group_names as $id => $group_name){
    						$child_groups=$this->recursive_groups($group_name);
    						$ret_groups=array_merge($ret_groups,$child_groups);
    					}
    				}
    			}
    			if ($this->_cache_support) {
                    if ("" != $this->get_cache_folder()) {
                        if (file_exists($this->get_cache_folder())) {
                            if ($cache_handle = fopen($this->get_cache_folder()."ldap_rgroup_".md5($group).".cache", "wb")) {
                                fwrite($cache_handle, serialize($ret_groups));
                                fclose($cache_handle);
                                @chmod($this->get_cache_folder()."ldap_rgroup_".md5($group).".cache", octdec($this->_linux_file_mode));
                            }
                        }
                    } else {
        				$this->_cache_recursive_groups[$group] = $ret_groups;
                    }
    			}
            } else {
                $this->_debug_message = "The requested group $group is not in cache.";
            }
        }
        return ($ret_groups);
    }
864787
public function checkUserGroupExistence( $id )
    {
        /** @var \eZ\Publish\API\Repository\Repository $repository */
        $repository = $this->getRepository();
        $userService = $repository->getUserService();

        return $repository->sudo(
            function() use( $id, $userService )
            {
                // attempt to load the content type group with the id
                try
                {
                    $userService->loadUserGroup( $id );
                    return true;
                }
                catch ( ApiExceptions\NotFoundException $e )
                {
                    return false;
                }
            }
        );
    }
218874
public function getGroupById($id_group)
    {
        if (array_key_exists($id_group, $this->byid)) {
            return $this->byid[$id_group];
        }

        return false;
    }
375779
public function startCache()
    {
        global $USER;

        if ($this->arParams['CACHE_TYPE'] && $this->arParams['CACHE_TYPE'] !== 'N' && $this->arParams['CACHE_TIME'] > 0)
        {
            if ($this->templatePage)
            {
                $this->cacheAdditionalId[] = $this->templatePage;
            }

            if ($this->arParams['CACHE_GROUPS'] === 'Y')
            {
                $this->cacheAdditionalId[] = $USER->GetGroups();
            }

            if ($this->startResultCache($this->arParams['CACHE_TIME'], $this->cacheAdditionalId, $this->cacheDir))
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        return true;
    }
571260
public function remove($id)
    {
        try {
            if (\apc_delete($id)) {
                $this->removeFromHashmapById($id);

                return true;
            }
        } catch (\Exception $e) {
            $this->log('warning', \sprintf('Unable to delete cache for id %s : %s', $id, $e->getMessage()));

            return false;
        }
    }
176625
public static void start(final Cache<Serializable, Object> cache)
   {
      PrivilegedAction<Object> action = new PrivilegedAction<Object>()
      {
         public Object run()
         {
            cache.start();
            return null;
         }
      };
      SecurityHelper.doPrivilegedAction(action);
   }
1272522
public static function start(&$config) {
		self::$cacheDirectory = self::initialGetCacheDirectory ( $config );
		$cacheDirectory = \ROOT . \DS . self::$cacheDirectory;
		Annotations::$config ['cache'] = new AnnotationCache ( $cacheDirectory . '/annotations' );
		self::register ( Annotations::getManager () );
		self::getCacheInstance ( $config, $cacheDirectory, ".cache" );
	}
488689
public static function setDoctrineCache(DoctrineCacheProvider $cache)
    {
        self::$cacheImplementation = new DoctrineCache($cache);
        self::$hasBeenCleared      = false;
    }
506340
public function clean($group = null)
	{
		$hash = $this->options['hash'];

		$allinfo = $this->apcu ? apcu_cache_info() : apc_cache_info('user');

		foreach ($allinfo['cache_list'] as $key)
		{
			if (strpos($key['info'], $hash . '-cache-' . $group . '-') === 0) // xor $mode != 'group')
			{
				$this->apcu ? apcu_delete($key['info']) : apc_delete($key['info']);
			}
		}
		return true;
	}
100167
public function start($name = null, $id = null)
    {
        if (!session_id()) {
            if ($name) {
                session_name($name);
            }
            if ($id) {
                session_id($this->id);
            }
            session_start();
            return true;
        }
        return false;
    }
507548
protected static function invalidateCache($id)
    {
        $type = static::getType();

        $id = (string)$id;

        static::initializeCache($type);

        $collection = self::$cache->{$type};

        unset($collection->{$id});
    }
151533
public function setResultCacheId($id)
    {
        $this->queryCacheProfile = $this->queryCacheProfile
            ? $this->queryCacheProfile->setCacheKey($id)
            : new QueryCacheProfile(0, $id, $this->em->getConfiguration()->getResultCacheImpl());

        return $this;
    }
85709
public function rtcGetDelete(string $id, string $group = '_default', $default = null)
    {
        $result = $this->rtcGet($id, $group, $default);
        $this->rtcDelete($id, $group);

        return $result;
    }
766855
public function clean($group = null)
	{
		$prefix = $this->options['hash'] . '-cache-' . $group . '-';

		foreach ($this->data as $key => $value)
		{
			if (substr($key, 0, strlen($prefix)) == $prefix)
			{
				unset($this->data[$key]);
			}
		}

		return true;
	}
396759
public function isCached($id) {
        if ($id != null) {
            $id = $this->getIDfromOjb($id);
        }

        if ($id == null)
            return false;

        $cachefile = $this->getConfig('cacheDir') . '/' . utf8_decode($id);
        $cachetime = $this->getConfig('cacheTime');

        if (file_exists($cachefile) && time() - $cachetime < fileatime($cachefile)) {
            return true;
        }

        return false;
    }