Skip to main content

Get-CachedContent

SYNOPSIS​

{{ Fill in the Synopsis }}

SYNTAX​

Get-CachedContent [-Name] <String> [[-MaxAge] <TimeSpan>] [[-IsValidBlock] <ScriptBlock>]
[-CreateBlock] <ScriptBlock> [[-WriteBlock] <ScriptBlock>] [-ParseBlock] <ScriptBlock> [-NoCache]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION​

{{ Fill in the Description }}

EXAMPLES​

Example 1​

PS C:\> {{ Add example code here }}

{{ Add example description here }}

PARAMETERS​

-CreateBlock​

The script block which creates the content to be cached if needed, this should return a JSON object.

Type: ScriptBlock
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsValidBlock​

A Custom script block to determine if the cached content is still valid.

Type: ScriptBlock
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxAge​

The maximum age of the cache file.

Type: TimeSpan
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name​

The unique name of the cache file.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoCache​

Don't use the cached response, use the CreateBlock.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParseBlock​

The script block to parse the cached content.

Type: ScriptBlock
Parameter Sets: (All)
Aliases:

Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WriteBlock​

{{ Fill WriteBlock Description }}

Type: ScriptBlock
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction​

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters​

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS​

None​

OUTPUTS​

System.Object​

NOTES​