Skip to content

api_function_restoregithubactionscache

hugoalh edited this page Dec 27, 2023 · 12 revisions

Restore-GitHubActionsCache

πŸ‘€ Looking For Something Else

Looking for legacy Restore-GitHubActionsCache? That is moved to here!

πŸ”˜ NodeJS Wrapper

This dependents and requires NodeJS to invoke.

  • Type: Function
  • In Version: >= v2.0.0
  • Alias:
    • Import-GitHubActionsCache

Restore cache that shared from the past jobs and/or workflows.

  • # Parameter Set: AzureSdk (Default)
    Restore-GitHubActionsCache
      [-Path] <String[]>
      [-Key] <String[]>
      [-ConcurrencyBlobDownload]
      [-Lookup]
      [-SegmentTimeout <UInt32>]
      [-DownloadConcurrency <Byte>]
      [-Timeout <UInt16>]
  • # Parameter Set: NoAzureSdk
    Restore-GitHubActionsCache
      [-Path] <String[]>
      [-Key] <String[]>
      [-ConcurrencyBlobDownload]
      [-Lookup]
      [-SegmentTimeout <UInt32>]
      -NoAzureSdk

Parameter

ConcurrencyBlobDownload

[Optional] <Switch> Whether to use GitHub Actions NodeJS toolkit HttpClient with concurrency for Azure Blob Storage.

  • Parameter Set:
    • AzureSdk
    • NoAzureSdk
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”οΈ

DownloadConcurrency

[Optional] <Byte> Number of parallel downloads of the cache (only for Azure SDK).

  • Parameter Set: AzureSdk
  • 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:
    • AzureSdk
    • NoAzureSdk
  • Position: 1
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”οΈ
  • Accept Wildcard Characters: False ❌
  • Alias:
    • Keys
    • Name
    • Names

LookUp

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

  • Parameter Set:
    • AzureSdk
    • NoAzureSdk
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”οΈ

NoAzureSdk

<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: NoAzureSdk
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”οΈ

Path

<String[]> Paths of the cache, support Glob.

  • Parameter Set: Path
  • Position: 0
  • Accept Pipeline Input: True βœ”οΈ
  • Accept Pipeline Input By Property Name: True βœ”οΈ
  • Accept Wildcard Characters: True βœ”οΈ
  • Alias:
    • Paths

SegmentTimeout

[Optional] <UInt32> Maximum time for each segment download request of the cache, by milliseconds; This allows the segment download to get aborted and hence allow the job to proceed with a cache miss.

  • Parameter Set:
    • AzureSdk
    • NoAzureSdk
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”οΈ

Timeout

[Optional] <UInt32> Maximum time for each download request of the cache, by milliseconds (only for Azure SDK).

  • Parameter Set: AzureSdk
  • 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