Replies: 2 comments 5 replies
-
|
Hey, I don't get the value of the environemnt variable. So by default, assuming your env variable exist, If set Note You can always invoke Does this help? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @StefMa, Thank you so much for taking the time to respond and explain how the caching works! I really appreciate it. I apologize. I realize now that my original message wasn't clear at all. Let me try to explain what I'm actually looking for. You're absolutely right that caching is enabled by default and works great. What I didn't communicate well is that I'm actually hoping for an environment variable to specify the cache directory location (similar to the Let me describe our typical workflow to clarify the use case:
For production use cases, we need isolation between different projects. We don't want multiple projects sharing a user-level cache because:
I understand that Docker can provide this isolation in many cases, but we also have some constrained scenarios where Docker isn't available or practical. Right now, we add
The third point is particularly challenging because:
This is particularly important for us because we're serving development teams and trying to introduce pkl as a new tool. We believe pkl brings significant benefits, but we can't force developers to adopt this new approach. The key to getting buy-in is minimizing the cognitive burden on developers. If developers have to constantly think about whether they need to update the vendor directory, or worry about when to use which cache location, it creates significant friction that could prevent adoption. Making this transition transparent and seamless would be tremendously helpful in convincing teams to adopt pkl. I understand that for most use cases, pkl works perfectly out of the box. However, we're in a somewhat unique position where we straddle the boundary between online (development) and offline (production) environments, and need to support both seamlessly. An environment variable like
This pattern is common in other ecosystems (like npm with I hope this makes the use case clearer! If you have any suggestions or alternative approaches, I'd love to hear them. And of course, if this doesn't align with pkl's design philosophy, I completely understand. Thanks again for your help and for maintaining such a useful tool! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
In discussion #534, we talked about using a local cache directory to prepare the environment, enabling the use of the pkl tool in air-gapped environments.
Currently, each place that invokes pkl needs to explicitly include logic to determine whether to use a local cache directory or not. This creates repetitive code and increases the complexity of integration, especially in larger projects or multi-service environments.
Request:
It would be extremely helpful if pkl could support an environment variable (e.g., PKL_USE_CACHE_DIR or similar) that globally controls whether pkl should use the local cache directory. This would avoid the need for conditional logic scattered across various invocation points and provide a cleaner, centralized configuration mechanism.
Benefits:
Thanks for considering this request!
Beta Was this translation helpful? Give feedback.
All reactions