Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

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

Open
ericecook opened this issue Dec 3, 2014 · 4 comments

Comments

@ericecook
Copy link
Member

Specifically ones like

get_pool_hashrate()
pool_share_tracker()
orphan_percentage()

@ericecook ericecook changed the title Convert utils.py get_pool_hashrate() to be scheduled & cached in redis Convert some utils.py memoized functions to be scheduled & cached in redis Dec 3, 2014
@icook
Copy link
Member

icook commented Dec 16, 2014

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

@ericecook
Copy link
Member Author

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

@icook
Copy link
Member

icook commented Dec 16, 2014

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

@ericecook
Copy link
Member Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants