Skip to content

legacy_api_function_restoregithubactionscache

hugoalh edited this page Dec 27, 2023 · 2 revisions

Restore-GitHubActionsCache

πŸ‘Ž Deprecated

This is officially deprecated, maybe throw warning in the latest version, and maybe remove in the future version.

πŸ”˜ NodeJS Wrapper

This dependents and requires NodeJS to invoke.

  • Type: Function
  • In Version: v0.5.0 ~ v1.7.X
  • Alias:
    • Import-GitHubActionsCache

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

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

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

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

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