cache matched defaults sets for given parameters (#6888)
Merge pull request 6888
This commit is contained in:
parent
a0dc346e6c
commit
352133f39b
|
@ -188,10 +188,14 @@ module Jekyll
|
|||
#
|
||||
# Returns an array of hashes
|
||||
def matching_sets(path, type)
|
||||
@matched_set_cache ||= {}
|
||||
@matched_set_cache[path] ||= {}
|
||||
@matched_set_cache[path][type] ||= begin
|
||||
valid_sets.select do |set|
|
||||
!set.key?("scope") || applies?(set["scope"], path, type)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Returns a list of valid sets
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue