Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include parse mode to partial cache key #1727

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

ggmichaelgo
Copy link
Contributor

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.

@ggmichaelgo ggmichaelgo force-pushed the partial-cache-with-error-mode branch 2 times, most recently from 5225fae to 15464f2 Compare June 23, 2023 21:44
@ggmichaelgo ggmichaelgo force-pushed the partial-cache-with-error-mode branch from 15464f2 to dd7bbf2 Compare June 23, 2023 21:48
@ggmichaelgo ggmichaelgo changed the title include error mode to partial cache key include parse mode to partial cache key Jun 26, 2023
@ggmichaelgo ggmichaelgo merged commit c44d1d9 into master Jun 27, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants