Shopify / liquid

Liquid markup language. Safe, customer facing template language for flexible web apps.
https://shopify.github.io/liquid/
MIT License
11.13k stars 1.39k forks source link

include parse mode to partial cache key #1727

Closed ggmichaelgo closed 1 year ago

ggmichaelgo commented 1 year ago

What are you trying to solve?

When a PartialCache gets created, it is caching the Template by its name and without the used parse mode.

# from templates/index.liquid
{% render "snippet" %}  # parse the template in Lax mode

# from sections/product.liquid
{% render "snippet" %} # loads the previously parsed template that is parsed in Lax mode. (this should be using strict mode)

How are you solving this?

Add the ParseContext#error_mode value to the PartialCache's cache key to add more context.