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

Twig parent templates not updated on watch #14

Closed
allejo opened this Issue Oct 24, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@allejo
Copy link
Member

allejo commented Oct 24, 2016

If a Twig template changes and it is the parent of another Twig file, the changes made to the parent are not reflected since they've been cached by Twig. A possible solution would be to create a new Twig manager every time a parent template changes since I can't find a way to clear Twig's cached templates.

@allejo allejo added this to the v0.1.0-beta-3 milestone Oct 24, 2016

@allejo allejo referenced this issue Oct 24, 2016

Closed

Watch Command #5

6 of 7 tasks complete

@allejo allejo modified the milestones: v0.1.0-rc1, v0.1.0-beta-3 Dec 22, 2016

@allejo

This comment has been minimized.

Copy link
Member Author

allejo commented Dec 22, 2016

This might require a bit more of effort. Even clearing the filesystem cache and creating a new Twig Environment won't clear whatever cache Twig has for parent templates. Meh

Edit: The problem isn't really due to caching but more so the way Twig loads compiled templates into the run time as classes. Because the name of those classes are renaming the same regardless of the changes, it's using what has already been defined. How I'm using Twig needs to be changed or a workaround needs to be found

@allejo allejo modified the milestones: v0.1.0, v0.1.1 Mar 2, 2017

@allejo allejo added the Has PR label Apr 11, 2017

@allejo allejo closed this in 3a56dfe Apr 15, 2017

@allejo allejo removed the Has PR label Apr 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment