How would you design an efficient caching mechanism for a mobile application to store API responses locally?