Commit a07cca9
authored
569 setup fastapi caching (#603)
# Purpose
Closes #569.
Set up fastAPI caching for endpoints and create documentation for
implementing caching for future endpoints.
# New Changes
Explain new changes below in short bullet points.
- Added fastapi-caching2 to requirements
- initialize cache in lifespan.py
- add caching to available endpoints
Documentation for adding caching to future endpoints as they are
developed will be added to the team documentation site
# Testing
Explain tests that you ran to verify code functionality.
- [x] I have unit-tested this PR. Otherwise, explain why it cannot be
unit-tested.
- [ ] I have tested this PR on a board if the code will run on a board
(Only required for firmware developers).
- [ ] I have tested this PR by running the ARO website (Only required if
the code will impact the ARO website).
- [ ] I have tested this PR by running the MCC website (Only required if
the code will impact the MCC website).
- [x] I have included screenshots of the tests performed below.
<img width="944" height="36" alt="image"
src="https://github.com/user-attachments/assets/d5ca5fba-80b0-41df-9664-485c4ece999d"
/>
tests have been run for api, everything passes. The warnings are not
related to my changes
# Outstanding Changes
If there are non-critical changes (i.e. additional features) that can be
made to this feature in the future, indicate them here.1 parent c69676c commit a07cca9
File tree
3 files changed
+8
-0
lines changed- gs/backend/api
- v1/mcc/endpoints
3 files changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments