Closed unicornsleuth closed 3 years ago
Great stuff. I noticed the cache_toggle is currently set to on/off in your code. Personally I don't know how to access the key vault, but I know it was initially set as true/false so could cause issues after deployment. Since you did all the work I am going to try to set up redis queries so we don't need to expire caches in a time limit, and can instead expire based on taskid. I'll message if I get that working.
Closes #259
Format of query string now accepted:
/users/{userId}/tasks?count={count}&page={page}
note: failing to pass in the count or page values will return 1st 10
Other Changes: fix caching in /users
To Test:
(1) in VSCode add the line
"CACHE_TOGGLE": "On"
to functions/local.settings.json(2) under the "Run/Debug" tab in VSCode, run the functions
(3) go to Postman, c/p the endpoint for /users that VSCode will display on the terminal & enter integer values for {count} and {page}
(4) run a GET
(5) run another GET
(6) run a POST with a body like so:
(7) run (yet) another GET
(8) Change the CACHE_TOGGLE value in /functions/local.settings.json to "Off"
(9) run a GET
(10) run a POST with a body like in (6)