Police-Data-Accessibility-Project / data-sources-app

An API and UI for using and maintaining the Data Sources database
MIT License
2 stars 4 forks source link

⚡️ feat(middleware): Add functionality to cache homepage search results #317

Closed maxachis closed 2 weeks ago

maxachis commented 1 month ago

Fixes

Description

Testing

Performance

Docs

maxachis commented 1 month ago

@josh-chamberlain Done! Found here: https://github.com/Police-Data-Accessibility-Project/docs/pull/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.

josh-chamberlain commented 4 weeks ago

@maxachis

  1. on docs formatting, the reason it looks weird like that is because we're using gitbook and it's their ~proprietary format. I find making these changes is much easier in the WYSIWYG editor, which is something I hate to say so it must be true. You should be in the gitbook org, and this link will take you to the edit view: https://app.gitbook.com/@pdap/s/pdap/

It's a little weird at first, but the formatting will make a lot more sense.

  1. I should have thought of this before—did you consider modifying the agencies endpoint to accept an arg for the blank homepage, rather than creating a new endpoint?
maxachis commented 4 weeks ago

@maxachis

  1. on docs formatting, the reason it looks weird like that is because we're using gitbook and it's their ~proprietary format. I find making these changes is much easier in the WYSIWYG editor, which is something I hate to say so it must be true. You should be in the gitbook org, and this link will take you to the edit view: https://app.gitbook.com/@pdap/s/pdap/

It's a little weird at first, but the formatting will make a lot more sense.

  1. I should have thought of this before—did you consider modifying the agencies endpoint to accept an arg for the blank homepage, rather than creating a new endpoint?

@josh-chamberlain For 1: Is that mentioned somewhere in the documentation? Might be useful to add if not. For 2: The challenge is that this is specifically for recording a multitude of possible homepages, without a clear idea of which is most viable. Currently, it defaults to finding 10 possible homepages per agency. So we can't easily update the agencies row itself.

josh-chamberlain commented 3 weeks ago

@maxachis for 1. I left a comment on the docs PR

  1. oh, right—mixed up the context! thanks
maxachis commented 3 weeks ago

@josh-chamberlain Made a Docs Pull Requests, which I've linked in the main post!

josh-chamberlain commented 3 weeks ago

@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.