public function clearEnvironmentsCache($projectId)
    {
        $this->cache->delete('environments:' . $projectId);
        unset(self::$environmentsCache[$projectId]);
        foreach (array_keys(self::$notFound) as $key) {
            if (strpos($key, $projectId . ':') === 0) {
                unset(self::$notFound[$key]);
            }
        }
    }
public function clearEnvironmentsCache($projectId)
    {
        $this->cache->delete('environments:' . $projectId);
        unset(self::$environmentsCache[$projectId]);
        foreach (array_keys(self::$notFound) as $key) {
            if (strpos($key, $projectId . ':') === 0) {
                unset(self::$notFound[$key]);
            }
        }
    }
public function clearEnvironmentsCache ( $ projectId ) { $ this -> cache -> delete ( 'environments:' . $ projectId ) ; unset ( self :: $ environmentsCache [ $ projectId ] ) ; foreach ( array_keys ( self :: $ notFound ) as $ key ) { if ( strpos ( $ key , $ projectId . ':' ) === 0 ) { unset ( self :: $ notFound [ $ key ] ) ; } } }
Clear the environments cache for a project.

Use this after creating/deleting/updating environment(s).

@param string $projectId
Clear the environments cache for a project .