You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
skipCache: true, // Configure cache skip (except for files)
50
49
})
51
50
```
52
51
53
52
```python Python wrap highlight={4}
54
53
Template.build(
55
54
template,
56
-
alias="my-template",
55
+
'my-template',
57
56
skip_cache=True, # Configure cache skip (except for files)
58
57
)
59
58
```
@@ -91,7 +90,7 @@ template = (
91
90
92
91
## Use Case for Caching
93
92
You can leverage caching to create templates with multiple variants (e.g., different RAM or CPU) while reusing the common layers.
94
-
When building the template, just change the template alias to a specific RAM/CPU configuration (e.g., `my-template-2cpu-2gb`, `my-template-1cpu-4gb`), keep the rest of the template definition the same, and the build process will reuse the cached layers.
93
+
When building the template, just change the template name to a specific RAM/CPU configuration (e.g., `my-template-2cpu-2gb`, `my-template-1cpu-4gb`), keep the rest of the template definition the same, and the build process will reuse the cached layers.
95
94
96
95
## Optimize Build Times
97
96
To optimize build times, place frequently changing commands (e.g., copying source code) towards the end of your template definition. This way, earlier layers can be cached and reused more often.
0 commit comments