icssc / peterportal-public-api

API that provides easy-access to UC Irvine data such as: courses, professors, grade distribution, schedule of classes, and more
https://api.peterportal.org/
MIT License
23 stars 10 forks source link

Cache Current Week #195

Open ramanxg opened 2 years ago

ramanxg commented 2 years ago

From PR #191

Add a JSON cache for the current week helpers. The helpers can use the JSON for data instead of making requests to uci, (especially old dates). We can run a script to update the cache every year, and keep the script in /utils.

ramanxg commented 2 years ago

Ten year plan for UCI: https://www.reg.uci.edu/calendars/academic/tenyr-19-29.html Maybe we can use this for caching instead.

Edwu29 commented 2 years ago

This is how Peterportal client cached the data, although to MongoDB, might be helpful. https://github.com/icssc/peterportal-client/blob/master/api/src/helpers/week.ts

ramanxg commented 2 years ago

TODO: