I'm reposting this as I haven't found the answer that I'm looking for, and
there's no answer from microsoft yet, and I've been guaranteed 2 days
response time....

Hi,
I'm trying to purge a specific file data cached by the OS...
How do I accomplish that? I've tried to use various techniques (incl setting
the flag FILE_NO_INTERMEDIATE_BUFFERING) but the data is still cached. I'm
trying to force the system to re-read data in a dvdrom.
Apparently, the DVD rom won't be accessed if part of the data (few hundred
megs) are cached in the file system. I want this to be accssed each time -
or when I want it to.


i'm assuming that the file won't be memory-mapped into the memory.
I found that mounting and dismounting the drive would purge the cache, but
this
is a fairly big operation... wondering if there's a better way to do it.
This is evident if you try to copy some large files, cancelling it halfway
and do a re-copy would take shorter time as the reading is done via cache...
but if you disable the dvdrom, and re-enable it, the copy time would take as
long as the first time.

thanks in advance.

Kenny

Re: purging ntfs cache from driver - again, sorry... by Maxim

Maxim
Mon Aug 08 11:45:30 CDT 2005

CcPurgeCacheSection from the FSF.

Opening the volume itself for write access from any other code (can cause a
sharing violation, requires admin rights).

Any of these methods will fail if there are memory-mapped files - like
started EXEs or DLLs. In general, Windows just does not support this.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"Kenny Liew" <KennyLiew@discussions.microsoft.com> wrote in message
news:1DCBA2EB-0329-48B6-ACDC-F5016BDA4EB3@microsoft.com...
> I'm reposting this as I haven't found the answer that I'm looking for, and
> there's no answer from microsoft yet, and I've been guaranteed 2 days
> response time....
>
> Hi,
> I'm trying to purge a specific file data cached by the OS...
> How do I accomplish that? I've tried to use various techniques (incl setting
> the flag FILE_NO_INTERMEDIATE_BUFFERING) but the data is still cached. I'm
> trying to force the system to re-read data in a dvdrom.
> Apparently, the DVD rom won't be accessed if part of the data (few hundred
> megs) are cached in the file system. I want this to be accssed each time -
> or when I want it to.
>
>
> i'm assuming that the file won't be memory-mapped into the memory.
> I found that mounting and dismounting the drive would purge the cache, but
> this
> is a fairly big operation... wondering if there's a better way to do it.
> This is evident if you try to copy some large files, cancelling it halfway
> and do a re-copy would take shorter time as the reading is done via cache...
> but if you disable the dvdrom, and re-enable it, the copy time would take as
> long as the first time.
>
> thanks in advance.
>
> Kenny
>



RE: purging ntfs cache from driver - again, sorry... by pavel_a

pavel_a
Mon Aug 08 11:51:03 CDT 2005

Prehaps your question will be answered faster
if you explain what DVD-ROM has to do with NTFS cache.

Regards,
--PA


"Kenny Liew" wrote:
> I'm reposting this as I haven't found the answer that I'm looking for, and
> there's no answer from microsoft yet, and I've been guaranteed 2 days
> response time....
>
> Hi,
> I'm trying to purge a specific file data cached by the OS...
> How do I accomplish that? I've tried to use various techniques (incl setting
> the flag FILE_NO_INTERMEDIATE_BUFFERING) but the data is still cached. I'm
> trying to force the system to re-read data in a dvdrom.
> Apparently, the DVD rom won't be accessed if part of the data (few hundred
> megs) are cached in the file system. I want this to be accssed each time -
> or when I want it to.
>
>
> i'm assuming that the file won't be memory-mapped into the memory.
> I found that mounting and dismounting the drive would purge the cache, but
> this
> is a fairly big operation... wondering if there's a better way to do it.
> This is evident if you try to copy some large files, cancelling it halfway
> and do a re-copy would take shorter time as the reading is done via cache...
> but if you disable the dvdrom, and re-enable it, the copy time would take as
> long as the first time.
>
> thanks in advance.
>
> Kenny
>

Re: purging ntfs cache from driver - again, sorry... by pavel_a

pavel_a
Mon Aug 08 12:05:10 CDT 2005

So if even there is a memory mapped file,
will either of these methods purge all cached data besides the MMF?

--PA

"Maxim S. Shatskih" wrote:
> CcPurgeCacheSection from the FSF.
>
> Opening the volume itself for write access from any other code (can cause a
> sharing violation, requires admin rights).
>
> Any of these methods will fail if there are memory-mapped files - like
> started EXEs or DLLs. In general, Windows just does not support this.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "Kenny Liew" <KennyLiew@discussions.microsoft.com> wrote in message
> news:1DCBA2EB-0329-48B6-ACDC-F5016BDA4EB3@microsoft.com...
> > I'm reposting this as I haven't found the answer that I'm looking for, and
> > there's no answer from microsoft yet, and I've been guaranteed 2 days
> > response time....
> >
> > Hi,
> > I'm trying to purge a specific file data cached by the OS...
> > How do I accomplish that? I've tried to use various techniques (incl setting
> > the flag FILE_NO_INTERMEDIATE_BUFFERING) but the data is still cached. I'm
> > trying to force the system to re-read data in a dvdrom.
> > Apparently, the DVD rom won't be accessed if part of the data (few hundred
> > megs) are cached in the file system. I want this to be accssed each time -
> > or when I want it to.
> >
> >
> > i'm assuming that the file won't be memory-mapped into the memory.
> > I found that mounting and dismounting the drive would purge the cache, but
> > this
> > is a fairly big operation... wondering if there's a better way to do it.
> > This is evident if you try to copy some large files, cancelling it halfway
> > and do a re-copy would take shorter time as the reading is done via cache...
> > but if you disable the dvdrom, and re-enable it, the copy time would take as
> > long as the first time.
> >
> > thanks in advance.
> >
> > Kenny
> >
>
>
>