implement an on-disk cache