purging cache

Hi,

I’m writing a filter driver.

(1) I want the data in the cache to be decrypted.
When does the cache maneger write the data to the cache (before
or after getting to write completion routine).

(2) If I want to flush/purge the data from the cache, when is the right
place to do
it (write/read completion routines or when IRP_MJ_CLOSE occurs)

thanks,
Amir.

This message is processed by the PrivaWall Email Security Server.

> (1) I want the data in the cache to be decrypted.

When does the cache maneger write the data to the cache (before
or after getting to write completion routine).

Surely before - completion routine is called when the operation is
completed.

(2) If I want to flush/purge the data from the cache, when is the right
place to do
it (write/read completion routines or when IRP_MJ_CLOSE occurs)

IRP_MJ_CLEANUP/

Max

Amir wrote
> I’m writing a filter driver.
>
> (1) I want the data in the cache to be decrypted.
> When does the cache maneger write the data to the cache
(before
> or after getting to write completion routine).

If you want to encrypt / decrypt on the fly then you should filter
IRP_MJ_READ and IRP_MJ_WRITE requests with IRP_NOCACHE set. You
will need your own write buffer in which to do the encryption.

Joe