Better HN
topnewbestaskshowjobs
Log inSign up

MaxMoney

25 karma · joined Dec 15, 2021 (4y ago) · 88 submissions

Submissions

comment 4y ago · link · parent

I wouldn't recommend naming your function with a suffix that relates to a model. You are better off doing:

def generate_payload(crust, sauce, cheese, toppings):

comment 4y ago · link · parent

In the past I've used a timestamp key for the org. Create a key like f"org_{org.pk}" that has a timestamp. Then append that timestamp to the `get_users_for_org`. Now all you have to do is invalidate the org timestamp to generate a rolling key (requires more memory).
123