TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Randy Birch
date: 2004-06-16 05:56:00
subject: Re: Newbie - Need help pr

Don't try to nuke the entire cache, but rather just the file you are about 
to download.


Public Function DownloadFile(sSourceUrl As String, _
                             sLocalFile As String) As Boolean


   Call DeleteUrlCacheEntry(sSourceUrl)

   DownloadFile = URLDownloadToFile(....)

End Function


Unfortunately there's nothing (I know of) to prevent the caching of the 
downloaded files automatically.  (There is, interestingly, a corresponding 
API called URLDownloadToCacheFile which downloads data into the Internet 
cache and returns the file name of the cache location for retrieving the 
bits.  But there's no URLDownloadToFileButDontCacheIt API.

-- 

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.


"Chris Eytcheson"  wrote in message 
news:RMPzc.764282$oR5.434848{at}pd7tw3no...
: Thanks again Randy, your examples have helped immensely!
: I now have a working application that will download a series of files.
: As per your example, it also has a feature that can delete all the cached
: files (beforehand) minus the cookies.
:
: However, the application works but it suffers from serious performance
: issues.
: 1.  The function caches all the files it downloads.  This is a bad thing
: because each batch of files will be from 350 to 600MB.
:     That is going to fill up the disk space unneccsarily and 2 slow do the
: process considerably.
:     Ideally, the function should not write the file to the cache dir.
:     I checked the other news groups and the closet thing I can find is
:     "BINDF_NOWRITECACHE" but I think this is only available in c\c+.
:
: 2. The application tries to get a cached copy if it is avialable.  I can
: clear the cache before hand everytime but it is a
:     really inefficient process.
:     It seems like the command BINDF_GETNEWESTVERSION  is supposed to 
bypass
: the cache but it doesn't.
:
: 3. The program locks up while processing.
:     I think I can avoid this with "DoEvents" but I'll have to play around
: with it.
:
: Let me know what you think, I have been going through the other news 
groups
: and sites but it seems like
: every solution is super complicated.
:
: Chris
:
:
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 6/16/04 5:56:51 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.