Reducing cache size

Write cache to single file instead of individual files. Should save
disk space.