mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 17:30:43 -07:00
users can provide optional expression cache
This commit is contained in:
@@ -15,7 +15,10 @@ module Liquid
|
||||
# constructing new StringScanner in Lexer, Tokenizer, etc is expensive
|
||||
# This StringScanner will be shared by all of them
|
||||
@string_scanner = StringScanner.new("")
|
||||
@expression_cache = LruRedux::Cache.new(10_000)
|
||||
|
||||
@expression_cache = if options[:expression_cache] != false
|
||||
options[:expression_cache] || LruRedux::Cache.new(10_000)
|
||||
end
|
||||
|
||||
self.depth = 0
|
||||
self.partial = false
|
||||
|
||||
Reference in New Issue
Block a user