Skip to content

Fix bug with cached templates not registering new globals#1244

Merged
davidism merged 1 commit intopallets:masterfrom
MLH-Fellowship:cache-bugs
Mar 30, 2021
Merged

Fix bug with cached templates not registering new globals#1244
davidism merged 1 commit intopallets:masterfrom
MLH-Fellowship:cache-bugs

Conversation

@amy-lei
Copy link
Copy Markdown
Contributor

@amy-lei amy-lei commented Jun 23, 2020

Fixes #295
Summary:

  • Issue affected templates rendered and cached due to extend and include tags
    • Now updates Template object with new globals, if any, when retrieving from cache

Files affected:

  • environment.py
  • test_regression.py

Comment thread src/jinja2/environment.py Outdated
Comment thread tests/test_regression.py
@davidism davidism added this to the 3.0.0 milestone Mar 27, 2021
@amy-lei amy-lei force-pushed the cache-bugs branch 4 times, most recently from 7ba15f4 to 6097293 Compare March 30, 2021 05:33
@davidism davidism merged commit 40a312e into pallets:master Mar 30, 2021
@davidism davidism deleted the cache-bugs branch March 30, 2021 14:49
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template cache, {% extends %} and globals - design issue?

2 participants