Backlog Request: Liquid Caching

I’m not sure if the backlog is the correct place for this, but I thought I’d give it a shot.

This topic came up in the Treehouse meeting today.

It sounds like currently liquid is not cashed so that results in a query each time a page is loaded. Cashing liquid would allow data that’s pulled by liquid to be cashed, with the hopes of increasing page performance (especially for liquid heavy pages).

@Adam.Wilson I know you mentioned this in the meeting today. Do you have additional insight into this?

@vlad.z Are my assumptions correct? Do you have feedback on my request?

1 Like

Yeah, I don’t know if it’s even possible, but just trying to think of further optimisations.
Using Custom Modules and Liquid to control the page content is super convenient and useful, but often that data and the resulting render doesn’t actually change all that often (think, modules used to control page layout or site information…).
So, if the result was stored in a cache it might save quite a lot of API calls and server resources.

I can see how this might get very complex though, as modules can be tied together in complex ways. So perhaps it’s a setting in the module settings to allow caching or not.

I have a couple of sites where this would be very useful. There would need to be an automatic way to flag the cache as old & force a refresh on page load to ensure the page contains current data.

I would imagine that a site is cached between changes. So once there has has been any change to the back end the cached would be cleared and recreated. I guess there would be room for further optimization but having a more granular cache on a per module basis or something.

Hi, I suggest we come back to caching and other optimization ideas after the 6.0 release.


@vlad.z Thanks for your response. I’m excited to hear more about the “New Architecture” that’s in the current sprint. I’m also looking forward to any site performance improvements that might result from it.

Honestly, I have so little visibility into the treepl backend, that I’m definitely out of my depth even suggesting it. I just wanted to lob it out there.

I do know however on BC when we were writing complex liquid logic, when I had concerns about performance, one of my co-developers used to give me the “pshaw, don’t worry about it, liquid is cached” line. I’m not sure how valid that actually is, but it seemed legitimate.

If there is any way I can contribute, I’d be happy to.