How to deal with template re-parsing when changing the liquid version?

Viewed 69

We store in our database parsed template and don't want to store the source liquid code as it takes a lot of space in our database.

This works great however, we are not sure how to deal with upgrade of the liquid gem. We noticed that an upgrade often requires to parse the liquid code again so the template is up to date. But this doesn't seems to be documented anywhere ‍♂️.

How should we deal with liquid upgrades ?

  • Should we have a migration task that get back the initial liquid source code and recompile it ?
  • Is there a way to "re-parse" a template with a new version of the liquid gem ?
  • Is there a way to "un-parse" a template so we get access to the original source code again ?
1 Answers

You can subscribe to theme update webhooks. Whenever you get one, download your liquid templates, re-parse them, save them and move on.

Related