-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚡️ feat(middleware): Add functionality to cache homepage search results #317
Conversation
- Added new middleware file `homepage_search_cache.py` to handle caching of search results for agencies without homepage URLs - Added SQL queries to retrieve agencies without homepage URLs and update the search cache - Implemented functions to get agencies without homepage URLs and update search cache - Added new resource `HomepageSearchCache` in `resources/HomepageSearchCache.py` to handle API requests for retrieving and updating search cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! could you please add a section in the docs for this endpoint? that will also take care of PR review—if a reviewer can use the doc to hit the endpoint successfully, that's good.
@josh-chamberlain Done! Found here: Police-Data-Accessibility-Project/docs#15 Note that I am very unfamiliar with this format, and did not know how to test it. Additionally, because it was fairly redundant, I used ChatGPT to make the first draft. I anticipate this will need editing in the near future, especially as we test it; I'm just not sure how to do that at the moment. |
It's a little weird at first, but the formatting will make a lot more sense.
|
@josh-chamberlain |
@maxachis for 1. I left a comment on the docs PR |
@josh-chamberlain Made a Docs Pull Requests, which I've linked in the main post! |
@maxachis thank you! I approved, since the button was just looking at me, but if you are making docs in support of a PR I do not mind if you just reference + self-merge. |
Fixes
Description
homepage_search_cache.py
to handle caching of search results for agencies without homepage URLsHomepageSearchCache
inresources/HomepageSearchCache.py
to handle API requests for retrieving and updating search cacheTesting
Performance
Docs