mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 02:40:41 -07:00
Merge pull request #1887 from Shopify/remove-lru-redux
remove lru-redux
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "lru_redux"
|
|
||||||
|
|
||||||
module Liquid
|
module Liquid
|
||||||
# Context keeps the variable stack and resolves variables, as well as keywords
|
# Context keeps the variable stack and resolves variables, as well as keywords
|
||||||
#
|
#
|
||||||
@@ -41,7 +39,6 @@ module Liquid
|
|||||||
@filters = []
|
@filters = []
|
||||||
@global_filter = nil
|
@global_filter = nil
|
||||||
@disabled_tags = {}
|
@disabled_tags = {}
|
||||||
@expression_cache = LruRedux::ThreadSafeCache.new(1000)
|
|
||||||
|
|
||||||
# Instead of constructing new StringScanner objects for each Expression parse,
|
# Instead of constructing new StringScanner objects for each Expression parse,
|
||||||
# we recycle the same one.
|
# we recycle the same one.
|
||||||
@@ -183,7 +180,7 @@ module Liquid
|
|||||||
# Example:
|
# Example:
|
||||||
# products == empty #=> products.empty?
|
# products == empty #=> products.empty?
|
||||||
def [](expression)
|
def [](expression)
|
||||||
evaluate(Expression.parse(expression, @string_scanner, @expression_cache))
|
evaluate(Expression.parse(expression, @string_scanner))
|
||||||
end
|
end
|
||||||
|
|
||||||
def key?(key)
|
def key?(key)
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "lru_redux"
|
|
||||||
|
|
||||||
module Liquid
|
module Liquid
|
||||||
class Expression
|
class Expression
|
||||||
LITERALS = {
|
LITERALS = {
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Liquid
|
module Liquid
|
||||||
VERSION = "5.6.2"
|
VERSION = "5.6.3"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user