community icon indicating copy to clipboard operation
community copied to clipboard

Accuweather: cache response per location for 1h

Open glenrobertson opened this issue 1 year ago • 2 comments
trafficstars

Description

Update the accuweather app to cache responses per location for 1 hour, to prevent from hammering the API unnecessarily.

Copilot

copilot:all

glenrobertson avatar Feb 25 '24 22:02 glenrobertson

⚠️ The automated review process is experimental and likely has bugs. Please bear with us as we iron out the kinks and enable you to ship changes at high velocity 🚀

Next Steps

Hello! Thank you so much for your change 🤜 🤛 . There are a few things you need to do:

  • [ ] Sign the CLA if you haven't already
  • [ ] Ensure your build is green! Any problem will display a proposed solution to try out
  • [ ] Get a review, either by Tidbyt Bot or by a Tidbyt engineer

Manual Review Required

Hang tight! A Tidbyt engineer will be by shortly to review your change. Here is what they will be looking for:

Test Details
App Dir All files are in a single app directory
🟡 Modules Usage of cache.star requires review
🟡 Original Author The original author (sudeepban) does not match the PR author (glenrobertson)

Previews

apps/accuweather/accuweather.star:

tidbyt[bot] avatar Feb 25 '24 22:02 tidbyt[bot]

@sudeepban thoughts on adding a 1h cache?

glenrobertson avatar Feb 26 '24 14:02 glenrobertson

Hey @glenrobertson. Sorry for the very delayed review here.

I'm not sure this will do anything to lower the request rate, as the http module already caches requests. The existing ttl_seconds=3600 should handle this. I might be missing something though?

matslina avatar Mar 19 '24 17:03 matslina

Yea np we can close it. I ended up using nginx caching for my custom pixlet server since the way I'm using it couldn't make use of the cache anyway. Thanks for taking a look though!

glenrobertson avatar Mar 19 '24 18:03 glenrobertson