add mem cache. later will have disk cache