Split fstream cache into ifstream and ofstream caches.