Explain how you would implement a custom caching mechanism for remote images to minimize network requests.