Modularize the caching better, with filesystem backend