mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
include error mode to partial cache key
This commit is contained in:
@@ -4,7 +4,8 @@ module Liquid
|
||||
class PartialCache
|
||||
def self.load(template_name, context:, parse_context:)
|
||||
cached_partials = context.registers[:cached_partials]
|
||||
cached = cached_partials[template_name]
|
||||
cache_key = "#{template_name}:#{parse_context.error_mode}"
|
||||
cached = cached_partials[cache_key]
|
||||
return cached if cached
|
||||
|
||||
file_system = context.registers[:file_system]
|
||||
@@ -24,7 +25,7 @@ module Liquid
|
||||
|
||||
partial.name ||= template_name
|
||||
|
||||
cached_partials[template_name] = partial
|
||||
cached_partials[cache_key] = partial
|
||||
ensure
|
||||
parse_context.partial = false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user