Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Twig cache warmup missing / not being processed #15982

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

Closed
iquito opened this issue Sep 28, 2015 · 2 comments
Closed

Twig cache warmup missing / not being processed #15982

iquito opened this issue Sep 28, 2015 · 2 comments

Comments

@iquito
Copy link
Contributor

iquito commented Sep 28, 2015

I use a very basic vanilla Twig configuration and just started creating my first Twig templates, and noticed my templates are not being cached.

When running php app/console debug:container --env dev --show-private --tag kernel.cache_warmer the TemplateCacheCacheWarmer service does not appear - this is also the case when reinstalling Symfony without doing any configuration or changes at all. When running php app/console cache:warmup in a new project, the twig directory in /app/cache/dev (or /app/cache/prod) is not being created and no templates are "warmed up".

Does template caching have to be enabled or configured? I could not find anything in the documentation or anywhere else on how to enable template warmup caching.

@yethee
Copy link
Contributor

yethee commented Sep 28, 2015

Seems, this issue related to #15034
You can try register TwigBundle before FrameworkBundle in AppKernel::registerBundles() of your project.

@iquito
Copy link
Contributor Author

iquito commented Sep 28, 2015

Thanks, that worked!

Is there any downside to loading TwigBundle before FrameworkBundle?

fabpot added a commit that referenced this issue Oct 17, 2015
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fix Twig cache is not properly warmed

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15982
| License       | MIT
| Doc PR        | -

Alternative to #15034

Commits
-------

e704ee4 [TwigBundle] Fix Twig cache is not properly warmed
@fabpot fabpot closed this as completed Oct 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants