Skip to content

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

@raxoft

Description

@raxoft

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions