-
Notifications
You must be signed in to change notification settings - Fork 1
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(#169): cache expiry for remote places #183
base: main
Are you sure you want to change the base?
Conversation
I'm so pleased you're working on this. There is quite a bit of confusion from people in Kenya when the cache is stale. Much appreciated @inromualdo |
Hi @kennsippell Here’s the approach I’m taking to resolve the issue:
Currently, some tests are failing. I am working on resolving these issues and performing a manual test. In the meantime, please review my progress and provide any feedback or suggestions you may have on the process. |
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 ideas here. some feedback
@@ -47,9 +47,6 @@ | |||
|
|||
<div class="navbar-dropdown"> | |||
{% if op == 'table' %} | |||
<a class="navbar-item" hx-post="/app/refresh-all" hx-swap="none"> |
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.
Should we not support manual refresh? Do you need to wait an hour?
@@ -182,20 +189,28 @@ export class ChtApi { | |||
include_docs: true, | |||
}; | |||
console.log('axios.get', url, params); | |||
const resp = await this.axiosInstance.get(url, { params }); | |||
let places: any[] | undefined = ChtApi.cache.get(placeType); |
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.
previously cache was keyed by [domain][contact-type]
but now only by [contact-type]
. Isn't the domain dimension required? This allowed independant caches and timers for each county eCHIS instance... just because the cache has expired for Nairobi county instance, should it also expire for Migori county instance?
closes #169