< Back

Get-PSFResultCache

Sun Jan 19, 2020 6:40 pm

NAME Get-PSFResultCache



SYNOPSIS

Returns the last stored result





SYNTAX

Get-PSFResultCache [[-Type] <String>] [<CommonParameters>]





DESCRIPTION

Functions that implement the result cache store their information in the cache. This can then be retrieved by the

user running this command.

This forgives the user for forgetting to store the output in a variable and is especially precious when running

commands that take a while to execute.





PARAMETERS

-Type <String>

Default: Value

Options: All, Value

By default, this function will return the output that was cached during the last execution. However, this mode

can be switched:

- All: Returns everything that has been cached. This includes the name of the command calling

Set-PFSResultCache as well as the timestamp when it was called.

- Value: Returns just the object(s) that were written to cache



Required? false

Position? 1

Default value Value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-PSFResultCache



Returns the latest cached result.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-PSFResultCache -Type 'All'



Returns a meta-information object containing the last result, when it was written and which function did the

writing.











RELATED LINKS