From 573b431abbe0f20dd5abd6170546e7d74c930176 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 2 Dec 2020 11:26:51 +0530 Subject: [PATCH] Reduce allocations from computing item property (#8485) Merge pull request 8485 --- lib/jekyll/filters.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index 44971694..86253e44 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -422,7 +422,7 @@ module Jekyll end def item_property(item, property) - @item_property_cache ||= {} + @item_property_cache ||= @context.registers[:site].filter_cache[:item_property] ||= {} @item_property_cache[property] ||= {} @item_property_cache[property][item] ||= begin property = property.to_s