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

Changing brackets and expression cache #9

Closed
aMarCruz opened this issue Nov 11, 2015 · 3 comments
Closed

Changing brackets and expression cache #9

aMarCruz opened this issue Nov 11, 2015 · 3 comments

Comments

@aMarCruz
Copy link
Contributor

When brackets are changed after one expression is compiled, the compiled expression remains in the cache:

riot.util.brackets.set('{{ }}')
riot.util.tmpl('{{ x }} and { x }', { x: 2 })      // returns "2 and { x }"
riot.util.brackets.set(null)                       // reset brackets to '{ }'
riot.util.tmpl('{{ x }} and { x }', { x: 2 })      // fail, expression is in cache with '{{ }}'

There's no workaround.

@aMarCruz
Copy link
Contributor Author

From riot-tmpl v2.4.1 you can use the tmpl.clearCache function.

@GianlucaGuarini
Copy link
Member

cool thanks for the info @aMarCruz this would be handy to implement hot modules replacement

@aMarCruz
Copy link
Contributor Author

aMarCruz commented Jun 3, 2017

This issue will be solved in the near future.

@aMarCruz aMarCruz closed this as completed Jun 3, 2017
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