Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Liquid Element Caching Lifetimes

Solved

Liquid Element Caching Lifetimes

Gregarican
Shopify Partner
1033 86 293

I tried e-mailing Shopify support, but a guru told me he can't help get me an answer. And apparently cannot pass the question along to the Shopify devs or DBA's. So my only option is to post a question here, since he said the devs "often hang out" in here. So here goes. Can anyone who is either a dev or DBA at Shopify please grace me with a response?

Here goes........

I have worked with the Shopify API for a little over 4 years now. And am familiar with some of the basics at least. This isn’t necessarily an API question, and I’ve previosuly posed the question in the Shopify Forums. No feedback at all.

All I’m asking are two basic questions: 

- What is the absolute maximum cache lifetime for a Liquid resource?
- Is there some configuration setting I can access to define the maximum Liquid cache lifetime?

Thanks.

Accepted Solution (1)
Gregarican
Shopify Partner
1033 86 293

This is an accepted solution.

Sorry for the delayed response. I don't check the site often enough. I wound up going with a different approach. I created a private app, and the Shopify proxy was able to help me obscure my tokenization routine that hits my third-party API.

View solution in original post

Replies 4 (4)

Gregarican
Shopify Partner
1033 86 293

I'll probably reach the point of finally giving up on this. Analyzing some request/response traffic, it appears that some Liquid elements are being returned cached from well over 30 hours prior. I was hoping to embed a Liquid variable based on now, although I could create some leeway for cached data. Was allowing that to be up to 24 hours ago. 

If we are looking at well over that timespan, then the whole mechanism is pointless. And I know I can pull a current timestamp using client-side Javascript. But this variable is intended to be hidden and to be used as a hashing value to create another variable that the client can see...

Human
Shopify Partner
9 0 2

Hi Greg,

 

any updates on this? It could be very useful for authentication.

 

Greetings,

 

Thorwald

Gregarican
Shopify Partner
1033 86 293

This is an accepted solution.

Sorry for the delayed response. I don't check the site often enough. I wound up going with a different approach. I created a private app, and the Shopify proxy was able to help me obscure my tokenization routine that hits my third-party API.

Gregarican
Shopify Partner
1033 86 293

Here is a Community thread that touches upon the updated routine --> https://community.shopify.com/c/Shopify-APIs-SDKs/Private-App-Proxy-HMAC-Validation-Issue/m-p/452730. I can validate the HMAC on my third-party API's end to help validate that the request came from a supposedly real Shopify consumer.