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

View.compile should depend on engine as well. #9

Open
raxoft opened this issue Oct 16, 2013 · 0 comments
Open

View.compile should depend on engine as well. #9

raxoft opened this issue Oct 16, 2013 · 0 comments
Assignees

Comments

@raxoft
Copy link

raxoft commented Oct 16, 2013

Currently, View.compile takes only content of the view template as an argument. If compiled view cache is enabled (the default) and your project is using multiple engines and it happens that some templates have identical value (which happens for example in case of an empty string, which is the default template value), future View.compile calls may return other engine than the caller of View.compile actually expects. This then naturally leads to quite unexpected application errors.

One possible solution to avoid this would be to pass the engine itself to View.compile as well and make sure the engine.class is part of the checksum created from the template string.

@ghost ghost assigned manveru Oct 16, 2013
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

No branches or pull requests

2 participants