Skip to content

api_function_restoregithubactionscache

hugoalh edited this page Mar 24, 2023 · 12 revisions

Restore-GitHubActionsCache

πŸ”˜ NodeJS Wrapper: This dependents and requires NodeJS to invoke.

  • Type: Function
  • In Version: >= v0.5.0
  • Alias:
    • Import-GitHubActionsCache

Description

# Parameter Set: LiteralPath
Restore-GitHubActionsCache [-Key] <String[]> -LiteralPath <String[]> [-NotUseAzureSdk] [-DownloadConcurrency <Byte>] [-Timeout <UInt16>] [-SegmentTimeout <UInt16>] [-LookUp]

# Parameter Set: Path (Default)
Restore-GitHubActionsCache [-Key] <String[]> [-Path] <String[]> [-NotUseAzureSdk] [-DownloadConcurrency <Byte>] [-Timeout <UInt16>] [-SegmentTimeout <UInt16>] [-LookUp]

Restore cache that shared the data from the past jobs in the same workflow.

Parameter

DownloadConcurrency

[Optional] <Byte> Number of parallel downloads of the cache (only for Azure SDK), in range 1~16.

  • Parameter Set:
    • LiteralPath
    • Path
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”
  • Accept Wildcard Characters: False ❌
  • Alias:
    • Concurrency

Key

<String[]> Keys of the cache.

  • Parameter Set:
    • LiteralPath
    • Path
  • Position: 0
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”
  • Accept Wildcard Characters: False ❌
  • Alias:
    • Keys
    • Name
    • Names

LiteralPath

<String[]> Literal paths of the cache.

  • Parameter Set: LiteralPath
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”
  • Accept Wildcard Characters: False ❌
  • Alias:
    • LiteralFile
    • LiteralFiles
    • LiteralPaths
    • LP
    • PSPath
    • PSPaths

⚠ Important: Previously, this parameter did accept pipeline input, but often cause issues, avoid if possible.

LookUp

[Optional] <Switch> Weather to skip downloading the cache entry, and only check if a matching cache entry exists and return the cache key if it does.

  • Parameter Set:
    • LiteralPath
    • Path
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”

NotUseAzureSdk

[Optional] <Switch> Whether to not use Azure Blob SDK to download the cache that stored on the Azure Blob Storage, this maybe affect the reliability and performance.

  • Parameter Set:
    • LiteralPath
    • Path
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”
  • Alias:
    • NoAzureSdk

Path

<String[]> Paths of the cache.

  • Parameter Set: Path
  • Position: 1
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”
  • Accept Wildcard Characters: True βœ”
  • Alias:
    • File
    • Files
    • Paths

⚠ Important: Previously, this parameter did accept pipeline input, but often cause issues, avoid if possible.

SegmentTimeout

[Optional] <UInt16> Maximum time for each segment download request of the cache, by seconds in range 5~7200; This allows the segment download to get aborted and hence allow the job to proceed with a cache miss.

  • Parameter Set:
    • LiteralPath
    • Path
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”

Timeout

[Optional] <UInt16> Maximum time for each download request of the cache (only for Azure SDK), by seconds in range 5~7200.

  • Parameter Set:
    • LiteralPath
    • Path
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”

Output

<String> The key of the cache hit.

Guide

API

Enum

Enum Flag

Function

Function Alias

Clone this wiki locally