Skip to content

Commit

Permalink
remove expression caching while rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
ggmichaelgo committed Jan 13, 2025
1 parent 7124540 commit e200c45
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/liquid/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def initialize(environments = {}, outer_scope = {}, registers = {}, rethrow_erro
@filters = []
@global_filter = nil
@disabled_tags = {}
@expression_cache = LruRedux::ThreadSafeCache.new(1000)

# Instead of constructing new StringScanner objects for each Expression parse,
# we recycle the same one.
Expand Down Expand Up @@ -181,7 +180,7 @@ def []=(key, value)
# Example:
# products == empty #=> products.empty?
def [](expression)
evaluate(Expression.parse(expression, @string_scanner, @expression_cache))
evaluate(Expression.parse(expression, @string_scanner))
end

def key?(key)
Expand Down

0 comments on commit e200c45

Please sign in to comment.