This PR increases performance by minimizing network traffic, adds some conveniences (item link and only relevant info) from the API data and avoids Ankama 404s. There are no added features since the last fallback stays the same as the current master.
New strategy:
if (cached) return cached
else if (apiData) returnAndCache apiData
else returnAndCache websiteData
Using Redis for caching. I included a docker-compose file just to make it easier for others to get started since the Almanax command now depends on Redis.
Cached dates expire after 9 days to prevent wasting memory.
This PR increases performance by minimizing network traffic, adds some conveniences (item link and only relevant info) from the API data and avoids Ankama 404s. There are no added features since the last fallback stays the same as the current master.
New strategy:
Using Redis for caching. I included a docker-compose file just to make it easier for others to get started since the Almanax command now depends on Redis. Cached dates expire after 9 days to prevent wasting memory.