Solved

Cache screwed me up

Posted on 2000-02-24
1
184 Views
Last Modified: 2010-04-02
My co-worker wrote a C++ function that uses the CInternetfile class to get a file via FTP from our server to a local directory, say C:\XXX.  However, we found out, after installing IE5, the file is cached in the Temporary Internet Files Directory.  Therefore, sometimes when I open the file from C:\XXX, the content is the same even if the content on the server has changed.  It obviously got the file from the cache.  
I tired to delete the file from the cahce, but windows does not allow me to do so sometimes.  From Visual Foxpro, I can't delete the file from the cache too.  I believe that it is controlled by Windows.  so I guess deleting the file is not a possible way...

How can I force it to download from the server, not the cache?

0
Comment
Question by:lippo
1 Comment
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 2556850
1. There is an option which controls the behavior.

Control Panel/Internet/General/Temporary Internet files/Settings/Check for newer versions of stored pages

2. Use the Persistent URL Cache Functions to delete the cached files, such as DeleteUrlCacheEntry.

http://msdn.microsoft.com/workshop/c-frame.htm?951459852650#/workshop/networking/wininet/overview/cache.asp
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now