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

#159236196 Cache nutritional plan values #14

Merged
merged 1 commit into from
Aug 9, 2018

Conversation

Yiga-fred
Copy link
Contributor

@Yiga-fred Yiga-fred commented Aug 9, 2018

What does this PR do?

Cache for nutritional plan values.

Description of Task to be completed?

Enable caching for nutritional plan values.
Have the cache key deleted every time a NutritionPlan, Meal, and MealItem is added, edited or deleted.

How should this be manually tested?

  • Git clone project, https://github.com/andela/wg-wits

  • Checkout to branch ft-cache-nutritional-values-159236196

  • Create a virtual environment virtualenv wg-venv -p python3

  • Activate the virtual environment source wg-venv/bin/activate

  • Install requirements pip install -r requirements_devel.tx

  • Run the application python manage.py runserver

  • Log in to the application.

  • Navigate to the nutrition plan section.

  • Add at least 25 nutrition plans.

  • Open developer tools and note the time difference between Normal reload and hard reload.

Any background context you want to provide?

  • Before this implementation, loading nutritional plans took a longer time than it takes currently.

What are the relevant pivotal tracker stories?

#159236196

Screenshots (if appropriate)

Before
screen shot 2018-08-07 at 14 12 54
After
screen shot 2018-08-09 at 12 11 30

@coveralls
Copy link

coveralls commented Aug 9, 2018

Pull Request Test Coverage Report for Build 285

  • 69 of 69 (100.0%) changed or added relevant lines in 6 files are covered.
  • 35 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-0.2%) to 92.897%

Files with Coverage Reduction New Missed Lines %
wger/exercises/tests/test_categories.py 1 100.0%
wger/manager/views/set.py 1 96.33%
wger/manager/forms.py 2 100.0%
wger/exercises/tests/test_muscles.py 3 100.0%
wger/exercises/tests/test_equipment.py 3 100.0%
wger/exercises/tests/test_exercise.py 6 100.0%
wger/utils/widgets.py 19 97.4%
Totals Coverage Status
Change from base Build 277: -0.2%
Covered Lines: 12163
Relevant Lines: 13093

💛 - Coveralls

@Yiga-fred Yiga-fred force-pushed the ft-cache-nutritional-values-159236196 branch 3 times, most recently from 266e4e6 to b6c6250 Compare August 9, 2018 12:44
@RrNn
Copy link
Collaborator

RrNn commented Aug 9, 2018

LGTM

2 similar comments
@solnsubuga
Copy link
Contributor

LGTM

@ja-odur
Copy link
Contributor

ja-odur commented Aug 9, 2018

LGTM

@Yiga-fred Yiga-fred force-pushed the ft-cache-nutritional-values-159236196 branch from b6c6250 to fbabb51 Compare August 9, 2018 13:13
@solnsubuga solnsubuga merged commit 41b6799 into develop Aug 9, 2018
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

Successfully merging this pull request may close these issues.

None yet

5 participants