Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache nutritional values for plan #246

Closed
rolandgeider opened this issue Nov 27, 2015 · 5 comments
Closed

Cache nutritional values for plan #246

rolandgeider opened this issue Nov 27, 2015 · 5 comments
Milestone

Comments

@rolandgeider
Copy link
Member

Found during #241, dummy generator for nutrition plans: if a user has many plans (approx. more than 25), the overview renders slowly and too many DB-queries are fired just to calculate the total calories. Some caching of the values is probably the easiest solution, similar to the canonical_representation for workouts.

Steps:

  • cache the nutritional_info dictionary in NutritionPlans
  • add signals that delete the cache key everytime a NutritionPlan, Meal and MealItem is added, edited or deleted.
@brotich
Copy link

brotich commented Apr 11, 2017

@rolandgeider is this issue still a priority? I would love to take a stab at it based on some of the work done by the folks at @andela

@rolandgeider
Copy link
Member Author

Hi @andela-brotich! yes, while this is not priority 1A, I still want to solve this issue

@brotich
Copy link

brotich commented Apr 12, 2017

@rolandgeider cool. Will start on this on the weekend and update ASAP

@rolandgeider
Copy link
Member Author

👍 Great!

@rolandgeider rolandgeider added this to the 2.0 milestone Aug 31, 2020
@rolandgeider
Copy link
Member Author

rolandgeider commented Aug 31, 2020

Cherry-picked from andela/wg-millennium-falcon#29

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

No branches or pull requests

2 participants