Quote:
without cache memory usage
You have no choice in this matter, memory cache usage is mandatory. It is that way because cache gives huge benefits even to read one time a huge file.
So you can put your file and temporary file about anywhere on a HDD.
Last time a user was having choice about cache, is back to MS-DOS.
Without knowing what is in the first file, what parse and what usage of the filtered file you have after, it is impossible to give advice on an efficient technique for your problem.