首页 > > 详细

辅导CS412辅导asp语言程序、R语言程序调试

CAS CS412 PS5b: Cache 
Let’s extend your Mongo / Redis skills. 
Requirements 
0. Create a new branch, PS5b. Be sure that your .gitignore file has an entry to 
exclude /node_modules from being pushed to github. Create a new PS5b 
directory to hold your work. For this assignment, you’re extending what you did in 
PS4, so it makes sense to branch from there. There’s no testing requirement for 
this assignment. 
1. Refactor your Node app from PS4 to incorporate a simple redis cache. On the 
first call to your route, your Node app should call your third-party API, then 
store the result in redis before sending the response. Set the cache entry to 
expire after 30 seconds. 
2. Refactor your response to send a JSON object back to the client instead of 
rendering a template. The response should include a field that indicates 
whether the data came from cache or not. 
3. On subsequent calls for the same search string, read the value from cache if it 
present, otherwise go out to the API again. 
4. Push your homework files to your GitHub repo. 
5. Submit the GitHub repo/branch on Gradescope to complete the assignment. 
联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!