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

cacheable? false #18

Open
gja opened this issue May 9, 2016 · 0 comments · May be fixed by #20
Open

cacheable? false #18

gja opened this issue May 9, 2016 · 0 comments · May be fixed by #20

Comments

@gja
Copy link

gja commented May 9, 2016

I notice that the rails templates are not cacheable. This makes the template get re-read from disk, then parsed every time the view is rendered, which is slow.

I understand that rails template compilable implies you are returning the function as source code (which is unacceptable), but I was wondering if it made sense to memoize the "parse" function, so that it returns the same template?

The render-ing function would have to be a pure function. Thus, I think, you'd have to use the render! function, as the render mutates the templates with errors.

gja added a commit to gja/liquid-rails that referenced this issue May 29, 2016
This can be used to cache parsed liquid templates, closing chamnap#18
gja added a commit to gja/liquid-rails that referenced this issue May 29, 2016
This can be used to cache parsed liquid templates, closing chamnap#18
@gja gja linked a pull request May 29, 2016 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant