mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 02:40:41 -07:00
Revert "Merge pull request #466 from Shopify/remove-expression-cache"
This reverts commitd9ae36ec40, reversing changes made to2da9d49478.
This commit is contained in:
@@ -24,6 +24,7 @@ module Liquid
|
||||
@resource_limits = resource_limits || Template.default_resource_limits.dup
|
||||
@resource_limits[:render_score_current] = 0
|
||||
@resource_limits[:assign_score_current] = 0
|
||||
@parsed_expression = Hash.new{ |cache, markup| cache[markup] = Expression.parse(markup) }
|
||||
squash_instance_assigns_with_environments
|
||||
|
||||
@this_stack_used = false
|
||||
@@ -169,7 +170,7 @@ module Liquid
|
||||
# Example:
|
||||
# products == empty #=> products.empty?
|
||||
def [](expression)
|
||||
evaluate(Expression.parse(expression))
|
||||
evaluate(@parsed_expression[expression])
|
||||
end
|
||||
|
||||
def has_key?(key)
|
||||
|
||||
Reference in New Issue
Block a user