simplecrypto/simplecoin_multi

Convert some utils.py memoized functions to be scheduled & cached in redis

Opened this issue · 4 comments

Specifically ones like

get_pool_hashrate()
pool_share_tracker()
orphan_percentage()

I had been thinking on this one for a while, and ideally I'd like to modify flask cache in such a way that tasks like this could be at least semi-automatically generated/scheduled. This whole backend updating cached values is a really common pattern, and I'd like a more robust way to do it.

Definitely all extra at the moment tho. Not sure that these take very long when there's a cache miss anyway.

Related to #157

Yea, I'm more just thinking for uniformity. That, and it means occasionally someone's page load waits for these to get cached, which could be related to #173

We could profile them but I'd be pretty surprised if any of these queries take more than about 100ms.

Yea, I agree its (probably) a minor performance difference. Uniformity is the main reason.