Add cache methods. TODO: move to a cache driver.