Types/OpenPackage/get_Cache.ps1

<#
.SYNOPSIS
    Gets cache
.DESCRIPTION
    Gets an open package's cache.

    This is an ordered dictionary of data attached to the object, but not saved to disk.
#>

param()

if (-not $this) { return }

if (-not $this.'#Cache') {
    Add-Member -InputObject $this NoteProperty '#Cache' ([Ordered]@{}) -Force
}

return $this.'#Cache'