Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

feat(lume): disable image caching by default (#755)

Francesco Bonacci97689a7f0d1d
diff --git a/docs/content/docs/lume/guide/fundamentals/vm-management.mdx b/docs/content/docs/lume/guide/fundamentals/vm-management.mdx
index 7afbb8b283..6e87690e55 100644
--- a/docs/content/docs/lume/guide/fundamentals/vm-management.mdx
+++ b/docs/content/docs/lume/guide/fundamentals/vm-management.mdx
@@ -132,8 +132,49 @@ lume clone source-vm dest-vm --source-storage default --dest-storage external-ss
lume delete source-vm --storage default
```
+## Image Caching
+
+When pulling VM images from the registry, Lume can cache the downloaded layers locally to speed up future pulls of the same or similar images. **Caching is disabled by default** to save disk space.
+
+### Enable Caching
+
+If you frequently pull images and want faster downloads:
+
+```bash
+# Enable image caching
+lume config set cachingEnabled true
+
+# Set custom cache directory (optional)
+lume config set cacheDirectory /path/to/cache
+```
+
+### View Cache Settings
+
+```bash
+# View current configuration
+lume config get
+```
+
+This displays:
+- Default VM storage location
+- Cache directory path
+- Whether caching is enabled
+
+### Clear Cache
+
+To free up disk space used by cached image layers:
+
+```bash
+# Remove cached images
+lume prune
+```
+
+<Callout type="info">
+ With caching disabled (default), each `lume pull` downloads all image layers fresh. Enable caching if you frequently pull the same images or images that share common base layers.
+</Callout>
+
## Next Steps
-- [Unattended Setup](/lume/guide/advanced/unattended-setup) - Automate macOS setup
+- [Unattended Setup](/lume/guide/fundamentals/unattended-setup) - Automate macOS setup
- [HTTP Server](/lume/guide/advanced/http-server) - Use the REST API
- [CLI Reference](/lume/reference/cli-reference) - Full command reference
diff --git a/libs/lume/src/FileSystem/Settings.swift b/libs/lume/src/FileSystem/Settings.swift
index 1db10ad263..4337acc8ec 100644
--- a/libs/lume/src/FileSystem/Settings.swift
+++ b/libs/lume/src/FileSystem/Settings.swift
@@ -23,7 +23,7 @@ struct LumeSettings: Codable, Sendable {
],
defaultLocationName: "default",
cacheDirectory: "~/.lume/cache",
- cachingEnabled: true,
+ cachingEnabled: false,
registry: .defaultConfig
)
@@ -83,7 +83,7 @@ final class SettingsManager: @unchecked Sendable {
],
defaultLocationName: "default",
cacheDirectory: "~/.lume/cache",
- cachingEnabled: true,
+ cachingEnabled: false,
registry: .defaultConfig
)
@@ -297,7 +297,7 @@ final class SettingsManager: @unchecked Sendable {
var defaultLocationName = "default"
var cacheDirectory = "~/.lume/cache"
- var cachingEnabled = true // default to true for backward compatibility
+ var cachingEnabled = false // default to false to save disk space
var vmLocations: [VMLocation] = []
// Registry config parsing state