liquid-rails
liquid-rails copied to clipboard
cacheable? false
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.