Move the weather API call logic into a separate service file and implement caching to reduce redundant API calls and improve performance.