mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
use lru_redux getset for simplicity
This commit is contained in:
@@ -44,9 +44,7 @@ module Liquid
|
|||||||
|
|
||||||
# Cache only exists during parsing
|
# Cache only exists during parsing
|
||||||
if cache
|
if cache
|
||||||
return cache[markup] if cache.key?(markup)
|
cache.getset(markup) { inner_parse(markup, ss, cache).freeze }
|
||||||
|
|
||||||
cache[markup] = inner_parse(markup, ss, cache).freeze
|
|
||||||
else
|
else
|
||||||
inner_parse(markup, ss, nil).freeze
|
inner_parse(markup, ss, nil).freeze
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user