File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -168,15 +168,15 @@ function Get-GQL
168168 $Cache = $true
169169 }
170170
171+ $queryCacheKey = " $gqlQuery $ ( if ($Parameter ) { $Parameter | ConvertTo-Json - Depth 10 }) "
171172 if ($Cache -and -not $script :GraphQLOutputCache ) {
172173 $script :GraphQLOutputCache = [Ordered ]@ {}
173174 }
174175
175- if ($script :GraphQLOutputCache .$gqlQuery -and
176- -not $Parameter.Count -and
176+ if ($script :GraphQLOutputCache .$queryCacheKey -and
177177 -not $Refresh
178178 ) {
179- $script :GraphQLOutputCache .$gqlQuery
179+ $script :GraphQLOutputCache .$queryCacheKey
180180 continue nextQuery
181181 }
182182
@@ -240,7 +240,7 @@ function Get-GQL
240240 }
241241 }
242242 if ($Cache ) {
243- $script :GraphQLOutputCache [$gqlQuery ] = $gqlOutput
243+ $script :GraphQLOutputCache [$queryCacheKey ] = $gqlOutput
244244 }
245245 if ($queryOutPath ) {
246246 New-Item - ItemType File - Path $queryOutPath - Force - Value (
You can’t perform that action at this time.
0 commit comments