Reduce allocations from computing item property (#8485)

Merge pull request 8485
This commit is contained in:
Ashwin Maroli 2020-12-02 11:26:51 +05:30 committed by GitHub
parent 68497a4d4b
commit 573b431abb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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