Closed vincerubinetti closed 5 months ago
Name | Link |
---|---|
Latest commit | 5ed9a135b5c7630aeade74f544a8c0b39699df6c |
Latest deploy log | https://app.netlify.com/sites/exploring-cancer-in-colorado/deploys/6614801aea8e2200087925e5 |
@vincerubinetti I've refactored the /stats/measures
response as described by you in https://github.com/colorado-cancer-center/ecco/issues/53#issuecomment-2033049153. Note that I'm still pulling the default
field from hardcoded metadata for each factor and, now that it might not even exist for some measure categories, I'm starting to doubt its usefulness. I could just drop it and you can select the first factor value in the response as the default. I'm sorting them alphabetically, so if "All" is available it'll be the first option.
Because of the additional queries the /stats/measures
endpoint has become slightly more expensive. To address that, I've preemptively added in a caching system based on memached
, added a memcached
service to the stack that manages that cache, and flagged /stats/measures
as cacheable. Again, I don't think this change needed caching, but we'll eventually want it as the site's usage grows.
Re: default
, that sounds good. I've tweaked the frontend to not rely on it and instead just hardcode "All" or fallback to first. This is at least consistent with the other behavior in the UI, where I pick "nice" defaults when nothing is selected, e.g. "Total Population" in "Sociodemographics".
Closes #53