Closed jonrkarr closed 4 years ago
The endpoint now behaves as such: https://testapi.datanator.info/reactions/summary/get_sabio_obs/?parameter={} returns the sum of k_cats, k_ms, and k_is regardless of the parameter given. In the future when MongoDB hosts get upgraded, we can switch back to dynamically generating observation counts for different parameters.
It seems to still be returning the individual sums.
Is there a mechanism to cache these stats queries so they return more quickly?
It seems to still be returning the individual sums.
Is there a mechanism to cache these stats queries so they return more quickly?
I think it was still getting deployed just a few minutes ago. It finished deploying just now. MongoDB does have an automatic cache mechanism, but the memory size for our host is pretty low.
It is possible to cache just specific endpoints?
I'll look into https://flask-caching.readthedocs.io/en/latest/
Flask caching should allow you to just cache a few endpoints (the stats endpoints which are long and no arguments or arguments with a small set of possible values).
This endpoint fails: https://testapi.datanator.info/reactions/summary/get_sabio_obs/?parameter=k_is
One potential simiplification. The stats page isn't currently showing individual types of reaction constants, just the total. As a result, if its simpler, we could have 1 endpoint that returns that total number of K_cats + K_ms + K_is rather than executing the following three REST calls: