Faheetah / relaxir

Online recipe book written in Elixir and Phoenix
1 stars 0 forks source link

Frequently used (per user) ingredients list for suggestions #40

Open Faheetah opened 2 years ago

Faheetah commented 2 years ago

Cache the results on a time period so they decay out. Just keep a list (use DETS? data loss doesn't matter) {userId, [broccoli: 1, beef :10, bar: 10]} etc, when an ingredient is used it's incremented, if the ingredient isn't used for a while or gets bumped down in rank it gets dropped.

Functionality should be generic so we can do the same for nutrition for meal tracking.

Might be good to have functionality to hydrate. Restoring state should be easy, just grab the top X ingredients from a user's recipes. That would probably be a good initial implementation too.