Set PodeCache - mdaneri/Pode GitHub Wiki
Set (create/update) a key in the cache. You can use "$cache:key = 'value'" as well.
Set-PodeCache -Key <String> [-InputObject] <Object> [-Ttl <Int32>] [-Storage <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Set (create/update) a key in the cache, with an optional TTL value. You can use "$cache:key = 'value'" as well.
Set-PodeCache -Key 'ExampleKey' -InputObject 'ExampleValue'
Set-PodeCache -Key 'ExampleKey' -InputObject 'ExampleValue' -Storage 'ExampleStorage'
Set-PodeCache -Key 'ExampleKey' -InputObject 'ExampleValue' -Ttl 300
Set-PodeCache -Key 'ExampleKey' -InputObject @{ Value = 'ExampleValue' }
@{ Value = 'ExampleValue' } | Set-PodeCache -Key 'ExampleKey'
$cache:ExampleKey = 'ExampleValue'
The value of the key to be set, can be any object type.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The Key to be set.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ 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
An optional cache Storage name. (Default: in-memory)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An optional TTL value, in seconds. The default is whatever "Get-PodeCacheDefaultTtl" retuns, which will be 3600 seconds when not set.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.