Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How Do You Clear The Inet Cache


I am making a program with the inet control that downloads html from a website using the openurl command.

Everytime i do this however i keep getting an out of memory error

Is there a way to clear the inet cache so this error goes away?

Justin




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Clear Forms Cache
Is there a programmatic way to clear the forms cache in outlook (2000,XP)?
I work with some custom forms and they become corrupt every once in a while. I need a way for the user to clear the forms cache other than through Tools->Options....

Clear Cache And Cookies
How could I make a program that when you click a button it goes and clears your cookies and cache files?

API To Clear SSL State(ssl Cache)
Does anyone know an api that I can call to clear the SSL Cache.

I want to be able to call the same function that internet explorer does
tools->Internet Options->Content clear SSL State

Does anyone know how I can do this

Thanks
Kelly

Who Knows Some Codes To Clear IE Cache
Hi, Friends.

Now was confused with the cache Program.

Will anybody know codes to clear IE cache.

WIM, I want it can clear the cache following Keywords.

Any help is welcome!THX

Clear Internet Cache
I have the path to temp internet files using SHGetFolderPath.

I don't seem to be able to iterate through the files in this path using FindFirst and FindNext API calls, so I am guessing there is an api function to clear the internet cache?

Clear Memory And Cache - Please HELP!!
Dear all,

I would like to be able to write a pgram which just, at a click of a button clear memory and cache.

PLEASE HELP!!!

Thanks

Clear IE Browser Cache Redeux
i have been using this code


Code:
'---- del cache section
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
' ------ end del cache section


Private Sub ccache()
Dim cachefile As String
Dim cnt As Long
With List1
.Visible = False
.clear
Call GetCacheURLList
End With
With List1
For cnt = 0 To .ListCount - 1
cachefile = .List(cnt)
If InStr(cachefile, "Cookie") = 0 Then
Call DeleteUrlCacheEntry(cachefile)
End If
Next
.Visible = False
GetCacheURLList
.ListIndex = -1
End With
End Sub
Private Sub GetCacheURLList()

Dim icei As INTERNET_CACHE_ENTRY_INFO
Dim hFile As Long
Dim cachefile As String
Dim posUrl As Long
Dim posEnd As Long
Dim dwBuffer As Long
Dim pntrICE As Long
List1.clear
hFile = FindFirstUrlCacheEntry(0&, ByVal 0, dwBuffer)
If (hFile = ERROR_CACHE_FIND_FAIL) And _
(Err.LastDllError = ERROR_INSUFFICIENT_BUFFER) Then
pntrICE = LocalAlloc(LMEM_FIXED, dwBuffer)
If pntrICE <> 0 Then
CopyMemory ByVal pntrICE, dwBuffer, 4
hFile = FindFirstUrlCacheEntry(vbNullString, _
ByVal pntrICE, _
dwBuffer)

If hFile <> ERROR_CACHE_FIND_FAIL Then
Do
CopyMemory icei, ByVal pntrICE, Len(icei)
If (icei.CacheEntryType And _
NORMAL_CACHE_ENTRY) = NORMAL_CACHE_ENTRY Then
cachefile = GetStrFromPtrA(icei.lpszSourceUrlName)
List1.AddItem cachefile
End If
Call LocalFree(pntrICE)
dwBuffer = 0
Call FindNextUrlCacheEntry(hFile, ByVal 0, dwBuffer)
pntrICE = LocalAlloc(LMEM_FIXED, dwBuffer)
CopyMemory ByVal pntrICE, dwBuffer, 4
Loop While FindNextUrlCacheEntry(hFile, ByVal pntrICE, dwBuffer)
End If
End If
End If
Call LocalFree(pntrICE)
Call FindCloseUrlCache(hFile)

End Sub
Private Function GetStrFromPtrA(ByVal lpszA As Long) As String

GetStrFromPtrA = String$(lstrlenA(ByVal lpszA), 0)
Call lstrcpyA(ByVal GetStrFromPtrA, ByVal lpszA)
End Function

Private Sub Command1_Click()
Call ccache
End Sub



employs a user form with List1 listbox and Command1 button

it works great for all the files in the temp internet folder *except* the cookies. the cookies are always left over in this folder.

anyone know how to clear out *all* the files in the temporary internet folder (IE Browser cache folder), *including* the cookies?

Clear IE Browser Cache And History With VBA
Hi

Is there a way to clear out the cache and history using VBA code? (not using sendkeys). i know how to clear the cookies folder, but cache and history are an unknown. any help would be appreciated.

thanks

tx

WebBrowser Cache Is Killing Me . . . Can I Clear It?
I need to somehow get a webbrowser on my HTML Editing form to refresh so that it goes to 'App.Path & "Tmp.html" '

I know how to use the web browser control but it doesnt actually refresh; it uses the cache. Is there a way to clear the cache for just that page so that it will actually refresh???

How To Clear Internet Cache Manually Using VB?
Hi, I'm writting a code using Visual basic to refresh a web page.
But i need to clear the Cache before i refresh tha page.

Is there any code that i can use to clear the Cache?

Thank You!

How To Clear The IE Cache Memory Automatically While I Shut Down My Pc?
To empty internet cache:

goto www.mvps.org/vbnet/index.htmland search for FindFirstUrlCacheEntry

How Can I Clear The "Back" Cache Of My Webbrowser Control ?
How can i clear the "Back" cache of my webbrowser control ?

Clear Inet Cookie
is there anyway to clear/remove the cookie that an inet cookie is using?

Weird Problem Trying To Use Inet.execute And Inet.stillexecuting
Look at the code below. what it does is, grab a file from the server, open it up, determine what to download and download it. it just doesn't work when i loop it.

in the code you'll see a comment command, getcontent(0), that works, it updates the progress bar and everything. its when i try to loop and get multiple files that the problem pops up.

instead of downloading all the files, the counter immediately jumps to 9, nothing happens. i been fooling around with this for 4 hours, searched MS site to for bugs. I can't figure out whats wrong...



Dim Data() as Byte
Dim Files(10) as string
Dim BaseUrl as string
Dim Counter as Integer
Dim index as Integer
option Explicit

private Sub Form_Load()
Data() = Inet1.OpenURL("http://server/playlist.txt", icByteArray)
Open App.Path + "playlist.txt" for binary Access Write as #1
Put #1, , Data()
Close #1

Open App.Path + "playlist.txt" for input as #1
input #1, BaseUrl, Files(0), Files(1), Files(2), Files(3), Files(4), Files(5), Files(6), Files(7), Files(8), Files(9)
Close #1
for Counter = 0 to 9
List1.AddItem (BaseUrl + Files(Counter))
next
Inet1.AccessType = icUseDefault
' GetContent(0)

for index = 0 to 9
GetContent (index)
While Inet1.StillExecuting
DoEvents
Wend
next
End Sub
private Sub GetContent(byval index as Integer)
Inet1.URL = BaseUrl + Files(index)
Text1.Text = Inet1.URL
Text2.Text = Files(index)
Text3.Text = index
Inet1.Execute , "get"
End Sub



private Sub Inet1_StateChanged(byval State as Integer)

Dim vtData as Variant
Dim filesize as Long
Dim contenttype as Variant
Dim Chunks as Integer

Select Case State
' ... Other cases not shown.

Case icResponseCompleted ' 12
Dim bDone as Boolean: bDone = false
Dim tempArray() as Byte
Chunks = 0
filesize = Inet1.GetHeader("Content-length")
ProgressBar1.Max = filesize / 1024
contenttype = Inet1.GetHeader("Content-type")
Open "C:Temp" + Files(index) for binary Access Write as #1

' get first chunk.
vtData = Inet1.GetChunk(1024, icByteArray)
DoEvents
ProgressBar1.Value = 1
If len(vtData) = 0 then
bDone = true
End If

Do While Not bDone
tempArray = vtData
Put #1, , tempArray

' get next chunk.
vtData = Inet1.GetChunk(1024, icByteArray)
ProgressBar1.Value = Chunks
Chunks = Chunks + 1
DoEvents

If len(vtData) = 0 then
bDone = true
End If
Loop

Close #1
End Select '
End Sub

MS Inet Control StillExecuting....Even After Inet.Cancel!
My VB6 program is supposed to get the HTML code of a webpage but the Inet control is always StillExecuting. I know for a fact that the previous OpenURL finished successfully because I have the results. When I step through the code (F8) everything runs perfectly because it seems as if it gets the time it needs to finish up with the Inet control. Doing Inet1.Cancel does absolutely nothing even if I put it in the While loop that you see at the bottom. Why is it StillExecuting forever. The previous OpenURL just grabs a text file and returns succesfully. I've tried the sleep function but that puts the whole program to sleep as well. Help- I'm pulling my hair out

Code:
retValue = fMain.Inet1.OpenURL(someURL)
'
'Some stuff here with retValue- Not included for brevity
'
While (fMain.Inet1.StillExecuting)
    'this while loop goes forever
    DoEvents
Wend

retValue = fMain.Inet1.OpenURL(someURL)

Script That Will Clear Cookies/click A Button/clear Cookies...
Hi everyone, my Visual Basic knowledge is minimal. I used VB when its latest version was v6 long long ago... (2002-2003) And I was only able to create basic applications.

Now I need a script (or whatever that will do the job) to do this:

- Clear cookies in my browser
- Click a checkbox
- Click a button

I want something that can do this over and over again. I'd be really really glad if you could explain it in detail or give me some document links about it. Thanks in advance.

Cache
erm..
i'm making a program to see your upload and download on telenet
i need to go to a site to see the up and download, but when i open the second page, i get an error i don't have a cache

how do i make that?


grtz ruben

FTP Cache?
I'm using wininet.dll to write codes for FTPing files, but I often got some outdated one. Like if I just get a file from the site and then then I change the content of the file on the site, and I get the file again, it still contain the old stuff and cannot read the content I just changed. So I think maybe there're some kind of FTP cache somewhere, how can I clear these caches? Thx

Cache
I have this webbrowser in my form that goes to a variety of websites, I am looking for a way to find out where an image is stored in the cache or how to save it to a different directory. I realize I could search through the cache for that name but I figured there would probably be a better way since I know the picturename and the URL of it. Any suggestions?

VB And Cache
Hi everyone
     Need HELP!! I am trying to write a program so i can shut down Cache from one of our servers so that we can run the backup and also need to restart after the backup has finished, I have the program i need to shut down which is CSS.EXE and also to start it back up again, bu i need a little guidance to start me off!!! has anyone any ideas???

Thanks

Using The Cache Memory
Hello to everyone,
I have read about using the cache memory to have access to the data of a remote database which are frequently used, without connecting to the server time by time.
Who can suggest me how to do this ? (Visual Basic and Access db)

Thank You and Best Regards
Tdp

Cache Eraser
I'm trying to write a program that erases
Temporary Internet Files, Cookies and Cache from your computer. I'm assuming there's a way to find where all these directories exist depending particular computer. Anyone know how? Thanks

COM+ Data Cache
Does anyone have a clue how to cache data on a COM+ application server? I use stateless transactional components and ADO. A SQL server backend and an ASP frontend. Any help appreciated!!!!

Making Cache
allright, im working on a webbrowser.. and im working on multitabs, i figured i had to make a cache for each site, and load each cache by each tab.. heres what i have so far


Code:
Private Sub TabStrip1_Click()
For i = 1 To TabStrip1.Tabs.Count
If TabStrip1.Tabs(i).Selected = True Then
wb.Navigate2 "C:" & TabStrip1.Tabs(i).Caption & ".htm"
DownloadFile wb.LocationURL, "C:" & wb.LocationName & ".htm"
End If
Next i
End Sub

Private Sub wb_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
Form1.Caption = wb.LocationName & " - Eval"
cboURL.Text = wb.LocationURL
For i = 1 To TabStrip1.Tabs.Count
If TabStrip1.Tabs(i).Selected = True Then
TabStrip1.Tabs(i).Caption = wb.LocationName
DownloadFile wb.LocationURL, "C:" & wb.LocationName & ".htm"
End If
Next i
End Sub

this downloads the source when the navigation is complete, and shows it when you click on multiple tabs..

now.. it loads the cache, but doesnt show any images.. is it possible to save each image of the site as a cache to?

Cpu Cache And Vram
don't suppose anyone knows of any apis or links to how retrieve these two things

Cache Problem
I am relatively new to VB. I have some rows in Datagrid control. When i double click on a particular row, it pops up a new form with a value from the one of the field of Datagrid row which i clicked. I work on that form and close it, till that its fine. But now when i double click another row to open the popup form with this rows field value, it shows me the field value of previous Row which i clicked, what could be the reason i have tried all the things but failed. Can anybody suggest me whats the problem.

TIA

URLDownloadToFile Use Cache?
Hi I have used the following API to download a file. However I have noticed that after the first time it is downloaded. It is a lot quicker. I believe that it is getting it from the cache. Is this true? If so can I stop this some how?

URLDownloadToFile

THanks for your time.

Ben.

URL / Download Cache
I have this code:


Code:

Dim RetVal As Long
Dim URL As String
Dim SavePath As String

URL = http://www.website.com/file.html
SavePath = App.Path & "file.html"

RetVal = URLDownloadToFile(0, URL, SavePath, 0, 0)
If RetVal = 0 Then

Else

End If


I've been noticing that when it downloads the file, it isnt always up to date, yet the server copy is. Is there a chance that it's caching the old file, and when ever it downloads the file its just looking to the cached version instead of the new version?

If so, is there a way to make it download the new file, no matter what?

Get IE Cache Path?
Is there a way to get the path of the IE cache when using the WebBrowser object, or MSHTML, etc?

I'd prefer not to read the registry.

Thanks.

Frame Cache
Answered below

Web Server Cache
Hi
I'm making a Web Server, and
I have some Records I wont to Cache in ram,
instead of reading and Writing to disk.

But I'm worried about collisions when Accessing Records by more than one app

Does anyone have a suggestion on how to build a Cache that can be accessed by several apps at the same time


Anyone please?

OpenURL Cache
If I use the openURL function of the internet transfer control, are there any issues of the file getting pulled from cache instead of the most recent version on the server? I couldn't find a setting to force a fresh download each time, and I have no way of checking it's operation in regards to this.

Greg

MSHTML Cache
I grab html from a site the first time and everything goes great
but the second time, it just uses the first html code. Unless I restart the program

How would I disable the cache on MSHTML, or "reusing" that same page?

Access Cache!
How do I access the files that are stored in the cache (as Temporary Internet Files) when users navigate to different websites using IE?

Actually I intend to open the files stored in the cache in NotePad from a VB application.

Thanks,

Arpan

Clearing IE's Cache...Please Help
I am using this code to parse an site (any site). When you click the button (not in this code) it calls the sub below and displays the HTML of "page.html" in a textbox (txthtml):


Code:
Dim objLink As HTMLLinkElement
Dim objMSHTML As New MSHTML.HTMLDocument
Dim objDocument As MSHTML.HTMLDocument
Const strurl As String = "http://site.com/page.html"

Set objDocument = objMSHTML.createDocumentFromUrl(strurl, vbNullString)

While objDocument.ReadyState <> "complete"
DoEvents
Wend

txthtml.Text = objDocument.documentElement.innerText


The only problem is that once its requested the page and parsed/displayed the HTML code in txthtml (Textbox), it does not refresh/update the code after I launch the Sub again.

What I mean is, It saves the "page.html" in IE cache, and therefore does not update the code even if I press the button to run/call the sub again.

I am wondering if there is a statement to clear the cache or remove the document. Or maybe a simple IE cache clearer. This is really important to my project, please help.

Getting Objects From The IE Cache.
I want to write a program to get all the objects that have been stored in the Internet Explorer Cache and copy them elsewhere. Which API's should I be looking at?

Also can I read the Index.Dat file?

Cheers,
Abhijit

Flushing The IE Cache
I used to have some code for flushing the MSIE cache but I can't find it on MSDN any more. Any ideas?

Cache Problem
Well ... I'm working with api calls to get some software to act as a behind the scenes FTP client. That part all works fine, until you try to re-read a file that has been changed.

The file gets stored in the temporary internet files folder, which means that when you try to get an up to date file, it just gets the stored copy. No help to me.

I'm needing to find out where that folder is on any machine so that I can delete the file and effectivley force a download.

Anyone know how to find that folder ??

If theres an easier way out of this , please put me out of my misery.

Thanx

Control Cache?
Can you control the cache from the web browser? EX. All Images are put in Temp Internet Files by default. In my proggie, I have a web browser and would like it to download all the Images into CurDir/images/ ...

Any Help is welcome!

Thanks A Bunch!
Sam

Cache Problem
Hello,

I sent this message the other day and no one replied.



Is there anyone out there?



Has anyone else had this problem with IE?



I'm using IE5.5, and I'm trying to make the page refresh even



if someone hits the back button on the browser.



I'm also stuck behind My Proxy Server.



I've tried the following for ASP coding

=================3 D========3=========3 D======

<%
Response.Expires = 0
'Response.ExpiresAbsolute=#May 31,1999 13:30:15#
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "private"
%>

I've tried the following for HTML coding

=================3 D========3=========3 D======
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

No Luck !!!!!!!!!!!!!!!!!!!!!!!!!!

Appreciate your advice in advanced.

Thank you

Best Regards,

Raju

Outlook Cache
Our company has a number of laptop users who occasionaly connect to our domain (mainly they are on the road).

Their Outlook profiles are set with cache enabled (to allow for offline viewing of their emails) but what we have noticed is that when the user plugs their laptop into the network they don't receive any new updates from the Global Address book.

This means that any new entries to the address book that had been made since they last synced thier account does not get transfered.

We have a work-around of going into their profile and disabling cache mode, then exiting out of Outlook, going back in and enabling cache mode.

What i would like to do is create a small application that they can click at their own convenience that will disable/enable the cache mode and get the most recent copy of Global Address book. Because of the large size of our Global address book we don't want this sync to run upon every-login - just when the user clicks the application/script.

Any help, thoughts, ideas on how to achieve this would be greatfully welcome.



History Cache
anyone have any idea how to delete the contents of the history folder in ie?
(windows 2k and xp machines)

Clearing Out IE Cache
According to Microsoft site the following will clear out your IE cache:

My question is that sometimes I get the following error, when I run this on IE6:

"Unable to find the next cache entry -122 "

Does anyone know why this is happening and if there is a fix/workaround for it. Thanks!


Option Explicit

Private Declare Function FindFirstUrlCacheGroup Lib "wininet.dll" ( _
    ByVal dwFlags As Long, _
    ByVal dwFilter As Long, _
    ByRef lpSearchCondition As Long, _
    ByVal dwSearchCondition As Long, _
    ByRef lpGroupId As Date, _
    ByRef lpReserved As Long) As Long

Private Declare Function FindNextUrlCacheGroup Lib "wininet.dll" ( _
    ByVal hFind As Long, _
    ByRef lpGroupId As Date, _
    ByRef lpReserved As Long) As Long
    
Private Declare Function DeleteUrlCacheGroup Lib "wininet.dll" ( _
    ByVal sGroupID As Date, _
    ByVal dwFlags As Long, _
    ByRef lpReserved As Long) As Long
    
Private Declare Function FindFirstUrlCacheEntry Lib "wininet.dll" Alias "FindFirstUrlCacheEntryA" ( _
    ByVal lpszUrlSearchPattern As String, _
    ByRef lpFirstCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, _
    ByRef lpdwFirstCacheEntryInfoBufferSize As Long) As Long
    
Private Type INTERNET_CACHE_ENTRY_INFO
    dwStructSize As Long
    szRestOfData(1024) As Long
End Type

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

Private Declare Function FindNextUrlCacheEntry Lib "wininet.dll" Alias "FindNextUrlCacheEntryA" ( _
    ByVal hEnumHandle As Long, _
    ByRef lpNextCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, _
    ByRef lpdwNextCacheEntryInfoBufferSize As Long) As Long

Private Const CACHGROUP_SEARCH_ALL = &H0
Private Const ERROR_NO_MORE_FILES = 18
Private Const ERROR_NO_MORE_ITEMS = 259
Private Const CACHEGROUP_FLAG_FLUSHURL_ONDELETE = &H2
Private Const BUFFERSIZE = 2048

Private Sub Command1_Click()
    Dim sGroupID As Date
    Dim hGroup As Long
    Dim hFile As Long
    Dim sEntryInfo As INTERNET_CACHE_ENTRY_INFO
    Dim iSize As Long
        
    On Error Resume Next
    
    ' Delete the groups
    hGroup = FindFirstUrlCacheGroup(0, 0, 0, 0, sGroupID, 0)
    
    ' To avoid error using it with IE4 as FindFirstUrlCacheGroup is not implemented
    If Err.Number <> 453 Then
        If (hGroup = 0) And (Err.LastDllError <> 2) Then
            MsgBox "An error occurred enumerating the cache groups" & Err.LastDllError
            Exit Sub
        End If
    Else
        Err.Clear
    End If
    
    If (hGroup <> 0) Then
        'we succeeded in finding the first cache group.. enumerate and
        'delete
        Do
            If (0 = DeleteUrlCacheGroup(sGroupID, CACHEGROUP_FLAG_FLUSHURL_ONDELETE, 0)) Then
               
               ' To avoid error using it with IE4 as FindFirstUrlCacheGroup is not implemented
               If Err.Number <> 453 Then
                 MsgBox "Error deleting cache group " & Err.LastDllError
                 Exit Sub
               Else
                  Err.Clear
               End If
            End If
            iSize = BUFFERSIZE
            If (0 = FindNextUrlCacheGroup(hGroup, sGroupID, iSize)) And (Err.LastDllError <> 2) Then
                MsgBox "Error finding next url cache group! - " & Err.LastDllError
            End If
        Loop Until Err.LastDllError = 2
    End If
  
  ' Delete the files
    sEntryInfo.dwStructSize = 80
    iSize = BUFFERSIZE
    hFile = FindFirstUrlCacheEntry(0, sEntryInfo, iSize)
    If (hFile = 0) Then
        If (Err.LastDllError = ERROR_NO_MORE_ITEMS) Then
            GoTo done
        End If
        MsgBox "ERROR: FindFirstUrlCacheEntry - " & Err.LastDllError
        Exit Sub
    End If
    Do
        If (0 = DeleteUrlCacheEntry(sEntryInfo.szRestOfData(0))) _
            And (Err.LastDllError <> 2) Then
            Err.Clear
        End If
        iSize = BUFFERSIZE
        If (0 = FindNextUrlCacheEntry(hFile, sEntryInfo, iSize)) And (Err.LastDllError <> ERROR_NO_MORE_ITEMS) Then
            MsgBox "Error: Unable to find the next cache entry - " & Err.LastDllError
            Exit Sub
        End If
    Loop Until Err.LastDllError = ERROR_NO_MORE_ITEMS
done:
    MsgBox "cache cleared"
    Command1.Enabled = True
End Sub

WebBrowser Cache
Hi,


I was using the following snippet of code:

webBrowser.Navigate "http:\www.yahoo.com"

but it seems like its using a cache version. Is there any to tell it to NOT use the cache!?
I know that the Navigate method has a parameter called Flags, but I was not sure how to use it. If anyone could give me an example it would be much appreciated.

Thanks!

IE Cache Reader !
Is anybody know how can i read index.dat file stored in windows/temporary internet files
??

Cache Problem !!!!
Hi,

I am devloping WEB app. using ASP.
About App.
1.) First screen has View of details(say emp Parsonal info). & Edit option (file name View.asp)
2.) Clicking on Edit user get update screen there user can edit all info & save option.(update.html)
3.) In (save.asp) ASP page I am redirecting the (view.asp) after saving the record.here is the problem
the record is updated properly in database but I am getting old view.asp file form local m/c cache.
How to clear the cache form local m/c through code ??? the problem in Netscape.


Note : I am coding Response.Expire =0 in all asp pages

Thanks,
Venu Kumar.B.

ADO Cache Problem
**** it.

I just converted all my code to use ADO instead of DAO (taken me all weekend), now I find out theres a stupid cache problem with writing ADO recordsets.

Has anyone figured a way around this yet? I've tried all sorts of methods (begintrans, commitrans, JRO object etc.) and none of them work.

Does anyone know any other method apart from just waiting 5 seconds or so?

Thanks!

Question: Output Cache In ASP.NET
I'm researching ways to make sure our server is caching our pages (preferably indefinitely), and have come across the OutputCache directive.

<%@ OutputCache Duration="100" Location="ServerAndClient" VaryByParam="None" %>

The duration parameter is required, and is specified by milliseconds. The thing is, my pages are static and designed to rarely (if ever change). So in reality, I want the server to cache my aspx page (that gets translated to html before sending to the client) indefinitely.

Am I misunderstanding this "duration" extension? Am I misunderstanding the OutputCache directive?

revel8r

Application Configuration In Cache
Guys,

I've got a tricky job here!

Cenario is:

- I have a application Ini with the configuration of the Database (something like database.ini) and I have a Database DLL.

- I have a configuration table on the Database, something like (tb_configuration)

- To get application configuration information, I go on Sql Server and get the information, but currently i'm doing an ActiveX DLL that will use this configuration.
In the current cenario, everytime i Create the object CreateObject("ddname.class"), i get a new instance of the DLL and it goes again for the configuration table (connecting to the database, querying for the data) and this is ****ing me off.

The question is :

Is there anyway to record this configuration in another scope? So when i create the object it searches for the configuration in memory and only if not found it goes to the database.

PS.: I could pass this configuration to the DLL by the application (and save it on the Exe scope), but it will envolve more than 1 application, and the idea is to encapsulate all the information about this specific module only on the DLL.



Any ideas?
If I was not "clear" please reply asking me!

Copyright 2005-08 www.BigResource.com, All rights reserved