Open VinVorteX opened 1 week ago
i would like to work on this feature
I think the question is: is any of the api vendors actually complaining or are we doing this for users, because they are running into quota issue?
Also: why don't we persist the cache into /tmp
or disk at least? It seems that would be more useful as a long term solution that just an in-memory cache.
For the API vendors, I think we’re mainly doing this for users who might run into quota issues. We want to help them avoid hitting those limits, even if the vendors aren’t complaining right now.
As for caching, using in-memory caching was a quick and simple solution for speed. It’s great for short-term use since weather data changes often. But I totally agree that persisting the cache in /tmp or on disk would be a better long-term solution. It would help users keep data across sessions and reduce loading times. I can definitely look into adding that feature in the future!
As a oneshot terminal CLI in-memory cache does nothing. Once the program terminates, the cache is gone. So as implemented the code does nothing to my understanding. Without file persistence this makes no sense to me.
Implement caching to reduce the number of API calls, especially if the user requests the same location multiple times.