Thread Rating:
  • 2 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
programmatically clear cache
#4
Solved: 10 Years, 9 Months, 2 Weeks ago
Code:
Sub DeleteCache()
Dim root
Set root = CreateObject("FPC.Root")
Dim server
Dim cacheDrives
Dim cacheDrive
Dim fso
Set server = root.GetContainingServer()
server.StopFirewallService()
Set cacheDrives = server.CacheDrives
Set fso = CreateObject("Scripting.FileSystemObject")
For Each cacheDrive In cacheDrives
    cacheFilePath = CacheDrive.Name & "\urlcache\Dir1.cdat"
    fso.DeleteFile cacheFilePath
Next
server.StartFirewallService()
End Sub
Reply


Messages In This Thread
Clearing Cache programmatically - by Monika - 02-07-2008, 03:29 AM
RE: Clearing Cache programmatically - by Ankur - 02-18-2008, 11:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  activex automation programmatically nehastar 0 1,568 06-13-2012, 12:00 PM
Last Post: nehastar
  how to clear an entered value in a textbox padmini 2 19,018 09-23-2011, 03:23 PM
Last Post: padmini
  Clear input field before entering text janriis 1 5,698 08-13-2009, 05:53 PM
Last Post: basanth27
  dsn creation manually and programmatically pspsblog 2 2,837 08-09-2009, 06:11 AM
Last Post: pspsblog
Question How to programmatically export/save the result to html ConstantChange 4 6,625 02-25-2009, 01:20 PM
Last Post: Usman Muzaffar

Forum Jump:


Users browsing this thread: 1 Guest(s)