howardchung / watchparty

Watch anything together in-sync with your friends
https://www.watchparty.me
MIT License
741 stars 136 forks source link

getIsSubscriberByEmail check DB instead of stripe #838

Open howardchung opened 1 year ago

howardchung commented 1 year ago

Currently this call requires checking against the Stripe API on every request, which won't scale forever.

We currently cache the subscriber list in the database (syncSubs background process), so we can check the DB instead.

This doesn't update immediately though (it runs on an interval), so we have to make sure that new subs get this updated so they see the sub effects right after subscribing