Skip to content

Commit

Permalink
get psadapter from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Lee (POWERSHELL HE/HIM) (from Dev Box) committed Jul 2, 2024
1 parent 4a8e8d1 commit 8246ea9
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions powershell-adapter/psDscAdapter/win_psDscAdapter.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -81,32 +81,12 @@ function Invoke-DscCacheRefresh {
$refreshCache = $true
"Filtered DscResourceCache cache is empty" | Write-DscTrace
}
}
else
{
"Checking cache for stale entries" | Write-DscTrace

foreach ($cacheEntry in $dscResourceCacheEntries) {
#"Checking cache entry '$($cacheEntry.Type) $($cacheEntry.LastWriteTimes)'" | Write-DscTrace -Operation Trace

$cacheEntry.LastWriteTimes.PSObject.Properties | ForEach-Object {

if (-not ((Get-Item $_.Name).LastWriteTime.Equals([DateTime]$_.Value)))
{
"Detected stale cache entry '$($_.Name)'" | Write-DscTrace
$refreshCache = $true
break
}
}

"Filtered DscResourceCache cache is empty" | Write-DscTrace
}
else
{
"Checking cache for stale entries" | Write-DscTrace

foreach ($cacheEntry in $dscResourceCacheEntries) {
"Checking cache entry '$($cacheEntry.Type) $($cacheEntry.LastWriteTimes)'" | Write-DscTrace -Operation Trace
#"Checking cache entry '$($cacheEntry.Type) $($cacheEntry.LastWriteTimes)'" | Write-DscTrace -Operation Trace

$cacheEntry.LastWriteTimes.PSObject.Properties | ForEach-Object {

Expand Down

0 comments on commit 8246ea9

Please sign in to comment.