diff --git a/src/Public/Caching.ps1 b/src/Public/Caching.ps1 index 3be0951d8..93f7cef5b 100644 --- a/src/Public/Caching.ps1 +++ b/src/Public/Caching.ps1 @@ -52,7 +52,7 @@ function Get-PodeCache { } # used custom storage - if (Test-PodeCacheStorage -Key $Storage) { + if (Test-PodeCacheStorage -Name $Storage) { return (Invoke-PodeScriptBlock -ScriptBlock $PodeContext.Server.Cache.Storage[$Storage].Get -Arguments @($Key, $Metadata.IsPresent) -Splat -Return) } @@ -150,7 +150,7 @@ function Set-PodeCache { } # used custom storage - elseif (Test-PodeCacheStorage -Key $Storage) { + elseif (Test-PodeCacheStorage -Name $Storage) { $null = Invoke-PodeScriptBlock -ScriptBlock $PodeContext.Server.Cache.Storage[$Storage].Set -Arguments @($Key, $InputObject, $Ttl) -Splat } @@ -204,7 +204,7 @@ function Test-PodeCache { } # used custom storage - if (Test-PodeCacheStorage -Key $Storage) { + if (Test-PodeCacheStorage -Name $Storage) { return (Invoke-PodeScriptBlock -ScriptBlock $PodeContext.Server.Cache.Storage[$Storage].Test -Arguments @($Key) -Splat -Return) } @@ -255,7 +255,7 @@ function Remove-PodeCache { } # used custom storage - elseif (Test-PodeCacheStorage -Key $Storage) { + elseif (Test-PodeCacheStorage -Name $Storage) { $null = Invoke-PodeScriptBlock -ScriptBlock $PodeContext.Server.Cache.Storage[$Storage].Remove -Arguments @($Key) -Splat } @@ -301,7 +301,7 @@ function Clear-PodeCache { } # used custom storage - elseif (Test-PodeCacheStorage -Key $Storage) { + elseif (Test-PodeCacheStorage -Name $Storage) { $null = Invoke-PodeScriptBlock -ScriptBlock $PodeContext.Server.Cache.Storage[$Storage].Clear } @@ -554,4 +554,4 @@ function Get-PodeCacheDefaultTtl { param() return $PodeContext.Server.Cache.DefaultTtl -} \ No newline at end of file +}