locked
unable to clear cahe permanently though manually deleted cache files RRS feed

  • Question

  • I removed ccmcache manually by using shift delete as the cache size is full

    Though its free, I am getting error message, The content download
    cannot be performed because there is not enough available space in cache or the
    disk is full

    I had used powershell script but no luck its only deleting any folders present in ccmcache.

    How can we clear the cache though the files are not present in ccmcache

     

    $UIResourceMgr = New-Object -ComObject UIResource.UIResourceMgr

    $Cache = $UIResourceMgr.GetCacheInfo()

    $CacheElements = $Cache.GetCacheElements()

     

    foreach ($Element in $CacheElements)

        {

            $Cache.DeleteCacheElement($Element.CacheElementID)

        }

    Tuesday, March 31, 2015 3:23 PM

Answers

  • The client cache is currently in use by a running program or by a download in progress.

    • Proposed as answer by Daniel JiSun Thursday, April 9, 2015 8:53 AM
    • Marked as answer by Daniel JiSun Friday, April 10, 2015 1:58 AM
    Wednesday, April 1, 2015 12:49 PM

All replies

  • What size is your cache? The default is 5GB. You can find it by looking at the cache tab of the ConfigMgr applet in Control Panel (on a client). How much content are you trying to deploy?


    Gerry Hampson | Blog: www.gerryhampsoncm.blogspot.ie | LinkedIn: Gerry Hampson | Twitter: @gerryhampson

    Tuesday, March 31, 2015 3:43 PM
  • I removed ccmcache manually by using shift delete as the cache size is full

    You should *not* delete the content of the ccmcache folder manually. ConfigMgr tracks what's in the cache and manages it explicitly -- if you manually delete the files, ConfigMgr has no way of knowing this.

    If you need to clear the cache, use the Control Panel applet which has a clear cache button on it or use the VBScript you posted above.


    Jason | http://blog.configmgrftw.com | @jasonsandys

    Tuesday, March 31, 2015 3:44 PM
  • Manually going to Control panel to delete is disabled in our organization

    I started using a powrshell script but it started deleting the cache..but couple of machines, I am getting error message as below. Other its working fine

    in folder location C:\windows\ccmcache\17
    Exception calling "DeleteCacheElement" with "1" argument(s): "Exception from HRESULT: 0x87D01203"

    Script

    $UIResourceMgr = New-Object -ComObject UIResource.UIResourceMgr
    $Cache = $UIResourceMgr.GetCacheInfo()
    Write-Host "The total Cache size = $($Cache.TotalSize)"
    Write-Host "The total Cache free size before execution of script= $($Cache.FreeSize)"
    Write-Host "The total Cache used size before execution of script = $(($Cache.TotalSize) -($Cache.FreeSize))"
    $CacheElements = $Cache.GetCacheElements()
    foreach ($Element in $CacheElements)

        {

            Write-Host "Deleting CacheElement with PackageID $($Element.ContentID)"

            Write-Host "in folder location $($Element.Location)"
     If (!(Test-Path $($Element.Location)))
      {   
       md $($Element.Location)
    Write-Host " folder created successfully"
       }
           $Cache.DeleteCacheElement($Element.CacheElementID)

        }

    $UIResourceMgr = $null
    $Cache= $null
    $Element = $null

    $UIResourceMgr = New-Object -ComObject UIResource.UIResourceMgr
    $Cache = $UIResourceMgr.GetCacheInfo()
    Write-Host "The total Cache size = $($Cache.TotalSize)"
    Write-Host "The total Cache free size after execution of script= $($Cache.FreeSize)"
    Write-Host "The total Cache used size after execution of script = $(($Cache.TotalSize) -($Cache.FreeSize))"

    $UIResourceMgr = $null
    $Cache= $null
    $Element = $null

    Wednesday, April 1, 2015 12:23 PM
  • The client cache is currently in use by a running program or by a download in progress.

    • Proposed as answer by Daniel JiSun Thursday, April 9, 2015 8:53 AM
    • Marked as answer by Daniel JiSun Friday, April 10, 2015 1:58 AM
    Wednesday, April 1, 2015 12:49 PM