怎么清空windows 的缓存

如何清空windows 的缓存?请教如何把C:\DocumentsandSettings\cjy\LocalSettings\TemporaryInternetFiles文

如何清空windows 的缓存?
请教如何把
C:\Documents   and   Settings\cjy\Local   Settings\Temporary   Internet   Files

文件夹下面的所有文件全部删除?

请教

[解决办法]
Option Explicit
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' Copyright ?1996-2006 VBnet, Randy Birch, All Rights Reserved.
' Some pages may also contain other copyrights by the author.
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' Distribution: You can freely use this code in your own
' applications, but you may not reproduce
' or publish this code on any web site,
' online service, or distribute as source
' on any media without express permission.
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Private Const ERROR_CACHE_FIND_FAIL As Long = 0
Private Const ERROR_CACHE_FIND_SUCCESS As Long = 1
Private Const ERROR_FILE_NOT_FOUND As Long = 2
Private Const ERROR_ACCESS_DENIED As Long = 5
Private Const ERROR_INSUFFICIENT_BUFFER As Long = 122
Private Const MAX_PATH As Long = 260
Private Const MAX_CACHE_ENTRY_INFO_SIZE As Long = 4096

Private Const LMEM_FIXED As Long = &H0
Private Const LMEM_ZEROINIT As Long = &H40
Private Const LPTR As Long = (LMEM_FIXED Or LMEM_ZEROINIT)

Private Const NORMAL_CACHE_ENTRY As Long = &H1
Private Const EDITED_CACHE_ENTRY As Long = &H8
Private Const TRACK_OFFLINE_CACHE_ENTRY As Long = &H10
Private Const TRACK_ONLINE_CACHE_ENTRY As Long = &H20
Private Const STICKY_CACHE_ENTRY As Long = &H40
Private Const SPARSE_CACHE_ENTRY As Long = &H10000
Private Const COOKIE_CACHE_ENTRY As Long = &H100000
Private Const URLHISTORY_CACHE_ENTRY As Long = &H200000
Private Const URLCACHE_FIND_DEFAULT_FILTER As Long = NORMAL_CACHE_ENTRY Or _
COOKIE_CACHE_ENTRY Or _
URLHISTORY_CACHE_ENTRY Or _
TRACK_OFFLINE_CACHE_ENTRY Or _
TRACK_ONLINE_CACHE_ENTRY Or _
STICKY_CACHE_ENTRY
Private Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type

Private Type INTERNET_CACHE_ENTRY_INFO
dwStructSize As Long
lpszSourceUrlName As Long
lpszLocalFileName As Long
CacheEntryType As Long
dwUseCount As Long
dwHitRate As Long
dwSizeLow As Long
dwSizeHigh As Long
LastModifiedTime As FILETIME
ExpireTime As FILETIME
LastAccessTime As FILETIME
LastSyncTime As FILETIME


lpHeaderInfo As Long
dwHeaderInfoSize As Long
lpszFileExtension As Long
dwExemptDelta As Long
End Type

Private Declare Function FindFirstUrlCacheEntry Lib "wininet " _
Alias "FindFirstUrlCacheEntryA " _
(ByVal lpszUrlSearchPattern As String, _
lpFirstCacheEntryInfo As Any, _
lpdwFirstCacheEntryInfoBufferSize As Long) As Long

Private Declare Function FindNextUrlCacheEntry Lib "wininet " _
Alias "FindNextUrlCacheEntryA " _
(ByVal hEnumHandle As Long, _
lpNextCacheEntryInfo As Any, _
lpdwNextCacheEntryInfoBufferSize As Long) As Long

Private Declare Function FindCloseUrlCache Lib "wininet " _
(ByVal hEnumHandle As Long) As Long

Private Declare Function DeleteUrlCacheEntry Lib "wininet " _
Alias "DeleteUrlCacheEntryA " _
(ByVal lpszUrlName As String) As Long

Private Declare Sub CopyMemory Lib "kernel32 " _
Alias "RtlMoveMemory " _
(pDest As Any, _
pSource As Any, _
ByVal dwLength As Long)

Private Declare Function lstrcpyA Lib "kernel32 " _
(ByVal RetVal As String, ByVal Ptr As Long) As Long

Private Declare Function lstrlenA Lib "kernel32 " _
(ByVal Ptr As Any) As Long

Private Declare Function LocalAlloc Lib "kernel32 " _
(ByVal uFlags As Long, _
ByVal uBytes As Long) As Long

Private Declare Function LocalFree Lib "kernel32 " _
(ByVal hMem As Long) As Long



Private Sub Form_Load()

Command1.Caption = "Get Cache "
Command2.Caption = "Delete Selected "
Command3.Caption = "Delete All "
Label1.Caption = " "

End Sub


Private Sub Form_Resize()

If Me.WindowState <> vbMinimized Then

If Me.Width > 3000 Then

With Command1
.Left = Me.ScaleWidth - .Width - 200
.Top = 200
End With

With Command2
.Left = Command1.Left
.Top = Command1.Top + Command1.Height + 100
End With

With Command3
.Left = Command1.Left
.Top = Command2.Top + Command2.Height + 100
End With

With Label1
.Left = 200
.Top = Me.ScaleHeight - 100 - Label1.Height
End With

With List1
.Left = 200
.Top = 200
.Width = Command1.Left - 300
.Height = (Me.ScaleHeight - 300) - (Me.ScaleHeight - Label1.Top)
End With

End If

End If

End Sub


Private Sub Command1_Click()

With List1

'this speeds up adding to the list
'and eliminates list flicker
.Visible = False
.Clear
Call GetCacheURLList()
.Visible = True

Label1.Caption = .ListCount & " files listed. "

End With

End Sub


Private Sub Command2_Click()

Dim cachefile As String
Dim currindex As Long
Dim currtopindex As Long

'delete the selected file
With List1

'because we 're going to reload
'the cache following the deletion,


'be nice and save the current list
'position so it can be restored later
currtopindex = .TopIndex
currindex = .ListIndex
cachefile = .List(currindex)

Call DeleteUrlCacheEntry(cachefile)

'reload the list, hiding the list box
'to prevent flicker. (This workaround
'will not provided the desired results
'if a DoEvents is added to the
'GetCacheURLList routine!)

.Visible = False
GetCacheURLList
.TopIndex = currtopindex

If currindex > = .ListCount Then
.ListIndex = currindex - 1
Else
.ListIndex = currindex
End If

.Visible = True

Label1.Caption = .ListCount & " files listed. "

End With

End Sub