Reorganize and rename cache APIs.