#159236196 Cache nutritional plan values #14
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?
What are the relevant pivotal tracker stories?
#159236196
Screenshots (if appropriate)
Before
![screen shot 2018-08-07 at 14 12 54](https://user-images.githubusercontent.com/39955261/43889555-2b6ab1ba-9bcd-11e8-9701-3c0f2a26dd33.png)
![screen shot 2018-08-09 at 12 11 30](https://user-images.githubusercontent.com/39955261/43889626-66c7eca0-9bcd-11e8-8800-970184baafc5.png)
After